Return 405 instead of 500 on ClientError in the API.