ソースを参照

* Merging revisions r49197 from trunk:
------------------------------------------------------------------------
r49197 | michael | 2021-04-13 13:41:50 +0200 (Tue, 13 Apr 2021) | 1 line

* Fix for double error
------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@49302 -

michael 4 年 前
コミット
0e8042141d
1 ファイル変更3 行追加2 行削除
  1. 3 2
      packages/fcl-web/src/restbridge/sqldbrestbridge.pp

+ 3 - 2
packages/fcl-web/src/restbridge/sqldbrestbridge.pp

@@ -2019,8 +2019,9 @@ begin
     end;
   Finally
     // Make sure there is a document in case of error
-    if (aResponse.ContentStream.Size=0) and Not ((aResponse.Code div 100)=2) then
-      IO.RESTOutput.CreateErrorContent(aResponse.Code,aResponse.CodeText);
+    // MVC: Disabled for the moment, we need more reliable detection of this. it adds error twice in case of exception.
+    // if (aResponse.ContentStream.Size=0) and Not ((aResponse.Code div 100)=2) then
+    //  IO.RESTOutput.CreateErrorContent(aResponse.Code,aResponse.CodeText);
     if Not ((IO.Operation in [roOptions,roHEAD]) or aResponse.ContentSent) then
       IO.RestOutput.FinalizeOutput;
     aResponse.ContentStream.Position:=0;