Skip to content

Commit c7559c8

Browse files
committed
Algumas mudanças no response do Exception
1 parent 8fa8099 commit c7559c8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Src/Horse.HandleException.pas

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ procedure HandleException(Req: THorseRequest; Res: THorseResponse; Next: {$IF DE
6969
on E: Exception do
7070
begin
7171
LJSON := TJSONObject.Create;
72-
LJSON.{$IF DEFINED(FPC)}Add{$ELSE}AddPair{$ENDIF}('error', E.ClassName);
73-
LJSON.{$IF DEFINED(FPC)}Add{$ELSE}AddPair{$ENDIF}('description', E.Message);
74-
SendError(Res, LJSON, Integer(THTTPStatus.BadRequest));
72+
LJSON.{$IF DEFINED(FPC)}Add{$ELSE}AddPair{$ENDIF}('error', E.Message);
73+
SendError(Res, LJSON, Integer(THTTPStatus.InternalServerError));
7574
end;
7675
end;
7776
end;

0 commit comments

Comments
 (0)