Class: BWStatusBoardAPI::Response::Error
- Inherits:
-
Faraday::Response::Middleware
- Object
- Faraday::Response::Middleware
- BWStatusBoardAPI::Response::Error
- Defined in:
- lib/bw_status_board_api/response/error.rb
Overview
Brandwatch Status Board API response middleware to handle errors
Constant Summary collapse
- ERROR_MAP =
{ 400 => BWStatusBoardAPI::BadRequest, 401 => BWStatusBoardAPI::Unauthorized, 403 => BWStatusBoardAPI::Forbidden, 404 => BWStatusBoardAPI::NotFound, 406 => BWStatusBoardAPI::NotAcceptable, 422 => BWStatusBoardAPI::UnprocessableEntity, 429 => BWStatusBoardAPI::TooManyRequests, 500 => BWStatusBoardAPI::InternalServerError, 501 => BWStatusBoardAPI::NotImplemented, 502 => BWStatusBoardAPI::BadGateway, 503 => BWStatusBoardAPI::ServiceUnavailable }