From f440032167663c1dfb727511987510d1eb637f82 Mon Sep 17 00:00:00 2001 From: Gabriel Baltazar Date: Thu, 3 Feb 2022 20:13:42 -0300 Subject: [PATCH] Set E.Status on Http Status code (fix) correction of the Senderror call passing the E.Status --- Src/Horse.HandleException.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Horse.HandleException.pas b/Src/Horse.HandleException.pas index d6f354a..00fe4ee 100644 --- a/Src/Horse.HandleException.pas +++ b/Src/Horse.HandleException.pas @@ -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;