mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Remove developer exception page in production
- Replace it with an ErrorMessage payload - Adjust the client to account for this
This commit is contained in:
@@ -112,7 +112,11 @@ namespace Tgstation.Server.Client
|
||||
throw new MethodNotSupportedException();
|
||||
case HttpStatusCode.InternalServerError:
|
||||
// response json is html
|
||||
throw new ServerErrorException(json);
|
||||
throw new ServerErrorException(errorMessage ?? new ErrorMessage
|
||||
{
|
||||
Message = "An internal server error occurred!",
|
||||
SeverApiVersion = null
|
||||
}, response.StatusCode);
|
||||
case (HttpStatusCode)429:
|
||||
// rate limited
|
||||
response.Headers.TryGetValues("Retry-After", out var values);
|
||||
|
||||
Reference in New Issue
Block a user