You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tak-hntlabs opened this issue
Jul 20, 2022
· 2 comments
Labels
S-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-DefectBugs, crashes, hangs, vulnerabilities, or other reported problems.
Describe the bug
I am building an appservice. The AppService.onGetUsers returns http status 200 in the response message when an exception has occurred this.onUserQuery. Specifically, the onGetUsers method catches the exception, but does this:
This call sends back http status 200. The 200 status is surprising. I had expected 4xx for any exceptions or error because the request is not successful. Consequently, on the dendrite server, the rest of the logic mistakenly assumes the user query succeeded and eventually runs into other issues.
To Reproduce
Dev repro:
Set up Dendrite server + appservice.
Throw an exception in the implementation of onUserQuery.
Expected behavior
The catch block should return a 4xx status.
The text was updated successfully, but these errors were encountered:
Half-Shot
added
S-Major
Severely degrades major functionality or product features, with no satisfactory workaround
T-Defect
Bugs, crashes, hangs, vulnerabilities, or other reported problems.
labels
Jul 20, 2022
S-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-DefectBugs, crashes, hangs, vulnerabilities, or other reported problems.
Describe the bug
I am building an appservice. The AppService.onGetUsers returns http status 200 in the response message when an exception has occurred
this.onUserQuery
. Specifically, the onGetUsers method catches the exception, but does this:// AppService.ts line 232
} catch (e) { res.send({ ... }); }.
This call sends back http status 200. The 200 status is surprising. I had expected 4xx for any exceptions or error because the request is not successful. Consequently, on the dendrite server, the rest of the logic mistakenly assumes the user query succeeded and eventually runs into other issues.
To Reproduce
Dev repro:
Expected behavior
The catch block should return a 4xx status.
The text was updated successfully, but these errors were encountered: