We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0193a22 + c7559c8 commit 1bf3565Copy full SHA for 1bf3565
Src/Horse.HandleException.pas
@@ -64,9 +64,8 @@ procedure HandleException(Req: THorseRequest; Res: THorseResponse; Next: {$IF DE
64
on E: Exception do
65
begin
66
LJSON := TJSONObject.Create;
67
- LJSON.{$IF DEFINED(FPC)}Add{$ELSE}AddPair{$ENDIF}('error', E.ClassName);
68
- LJSON.{$IF DEFINED(FPC)}Add{$ELSE}AddPair{$ENDIF}('description', E.Message);
69
- SendError(Res, LJSON, Integer(THTTPStatus.BadRequest));
+ LJSON.{$IF DEFINED(FPC)}Add{$ELSE}AddPair{$ENDIF}('error', E.Message);
+ SendError(Res, LJSON, Integer(THTTPStatus.InternalServerError));
70
end;
71
72
0 commit comments