molgenis / molgenis

MOLGENIS - for scientific data: management, exploration, integration and analysis.
https://molgenis.org
GNU Lesser General Public License v3.0
111 stars 99 forks source link

Default error handling broken for /plugin/* controllers #8736

Closed fdlk closed 4 years ago

fdlk commented 4 years ago

How to Reproduce

See for example #8733

Expected behavior

Controller responses are the same as before

Observed behavior

Error handling specs have changed

fdlk commented 4 years ago

8733 works correctly in 8.1.8

bartcharbon commented 4 years ago

Some plugins still have an own exception handler for the RuntimeException that returns the getMessage(). It seems like the order in which this handler and the global one are called is changed.

Plugins with such a handler: metadatamanager, dataexplorer, user account controller, account controller, tagmanager and the permissionmanager

bartcharbon commented 4 years ago

Ignore previous comment: Order of the handlers is unchanged.

CodedRuntimeException is now handled through the FallbackExceptionHandler, note that the http response status has changed from 404 to 500.

8733 is caused by a change in the actual exception thrown.