Closed lunkwill42 closed 5 months ago
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
3 files 3 suites 25s :stopwatch: 247 tests 247 :heavy_check_mark: 0 :zzz: 0 :x: 741 runs 739 :heavy_check_mark: 2 :zzz: 0 :x:
Results for commit b4460351.
A magic decorator is used to allow API command responders that operate on Events to have its caseid argument automatically translated to a proper
Event
object. The decorator also ensures the command responder is never run if the incoming caseid is non-existent.However, there was a slight bug in the error handler: Command responders are async functions. Async functions are always awaitable (i.e. they return
Future
objects). When the caseid is non-existent, the decorator would return a plain value,None
in most cases, which is not awaitable. This would result in strange tracebacks in the logs, and also an additional "500 internal error" line being output to API clients (after the initial 500 message about the invalid caseid).This was found by running a legacy client against the Zino 2 API implementation. Regression tests are added.