mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(proxy): throw user-readable error when discord rejects a webhook username
This commit is contained in:
parent
3bae5344b6
commit
5196e332df
2 changed files with 32 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ public class DiscordRequestException: Exception
|
|||
public HttpStatusCode StatusCode => Response.StatusCode;
|
||||
public int? ErrorCode => ApiError?.Code;
|
||||
|
||||
internal DiscordApiError? ApiError { get; init; }
|
||||
public DiscordApiError? ApiError { get; init; }
|
||||
|
||||
public override string Message =>
|
||||
(ApiError?.Message ?? Response.ReasonPhrase ?? "") + (FormError != null ? $": {FormError}" : "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue