t3api icon indicating copy to clipboard operation
t3api copied to clipboard

Bug: 500 response is missing CORS header

Open Moongazer opened this issue 4 years ago • 0 comments

If an exception occurs, for example a custom operation-handler returns a wrong object type, the resulting 500 response is missing CORS headers. If the requesting front-end is running under another domain (e.g. during development http://localhost:8080/), the whole response incl. a possible error message is hided by the browser, which makes it very difficult to debug.

Possible solution: Also responses from the exception catch() blocks in SourceBroker\T3api\Dispatcher\Bootstrap::process() should call the processors $this->callProcessors(). Maybe this applies only for exceptions from the catch (Throwable $throwable) block.

Moongazer avatar Jul 30 '21 11:07 Moongazer