support custom error response codes by exception