Skip to content

Commit 1bf3565

Browse files
Merge pull request #7 from rmotafacundo/request
Algumas mudanças no response do Exception
2 parents 0193a22 + c7559c8 commit 1bf3565

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
@@ -64,9 +64,8 @@ procedure HandleException(Req: THorseRequest; Res: THorseResponse; Next: {$IF DE
6464
on E: Exception do
6565
begin
6666
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));
67+
LJSON.{$IF DEFINED(FPC)}Add{$ELSE}AddPair{$ENDIF}('error', E.Message);
68+
SendError(Res, LJSON, Integer(THTTPStatus.InternalServerError));
7069
end;
7170
end;
7271
end;

0 commit comments

Comments
 (0)