Do not crash on invocie creation error for greenfield (Fix #2111)

This commit is contained in:
nicolas.dorier 2020-12-08 14:47:20 +09:00
parent 76e46d2fa7
commit 97b00053c4
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -10,8 +10,7 @@ namespace BTCPayServer.Client.Models
}
public GreenfieldAPIError(string code, string message)
{
if (code == null)
throw new ArgumentNullException(nameof(code));
code = code ?? "generic-error";
if (message == null)
throw new ArgumentNullException(nameof(message));
Code = code;