Throwing BadRequestError on Http 401