Skip to content

Commit

Permalink
Set E.Status on Http Status code
Browse files Browse the repository at this point in the history
(fix) correction of the Senderror call passing the E.Status
  • Loading branch information
gabrielbaltazar authored Feb 3, 2022
1 parent 51d1ab8 commit f440032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Horse.HandleException.pas
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ procedure HandleException(Req: THorseRequest; Res: THorseResponse; Next: {$IF DE
LStatus := Integer(THTTPStatus.InternalServerError);
LJSON := TJSONObject.Create;
LJSON.{$IF DEFINED(FPC)}Add{$ELSE}AddPair{$ENDIF}('error', E.Message);
SendError(Res, LJSON, Integer(E.Status));
SendError(Res, LJSON, LStatus);
end;
end;
end;
Expand Down

0 comments on commit f440032

Please sign in to comment.