IllegalArgumentException thrown from HttpHandler should result in 400, not 500

Description

Currently if there is IllegalArgumentException thrown from http handler, the HttpExceptionHandler will turn it into a 500 response, but I think 400 should be returned instead.

Release Notes

None

Activity

Show:
Ali Anwar
December 21, 2016, 9:33 PM

Yes, please. It is annoying for each handler to individually catch it and respond with 400.
Or to catch a JsonSyntaxException and throw a 400.

Ali Anwar
August 17, 2018, 12:08 AM

Part of this PR could have been unnecessary if this Jira was implemented: https://github.com/caskdata/cdap/pull/10540

Assignee

Terence Yim

Reporter

Terence Yim

Labels

None

Docs Impact

None

UX Impact

None

Priority

Major
Configure