From 5f21d3c43db5d8aeb2622f2bfcfd04c80a50e829 Mon Sep 17 00:00:00 2001 From: Vinicius Sanchez Date: Fri, 4 Feb 2022 09:49:02 -0300 Subject: [PATCH] Set E.Status on Http Status code --- 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 00fe4ee..1b50ee6 100644 --- a/Src/Horse.HandleException.pas +++ b/Src/Horse.HandleException.pas @@ -60,7 +60,7 @@ procedure HandleException(Req: THorseRequest; Res: THorseResponse; Next: {$IF DE begin LJSON.{$IF DEFINED(FPC)}Add{$ELSE}AddPair{$ENDIF}('type', GetEnumName(TypeInfo(TMessageType), Integer(E.&Type))); end; - SendError(Res, LJSON, E.Code); + SendError(Res, LJSON, Integer(E.Status)); end; on E: Exception do begin