lib/intercom/request.rb in intercom-3.5.14 vs lib/intercom/request.rb in intercom-3.5.15

- old
+ new

@@ -137,13 +137,15 @@ :application_error_code => error_code, :field => error_field, :request_id => error_list_details['request_id'] } case error_code - when 'unauthorized', 'forbidden' + when 'unauthorized', 'forbidden', 'token_not_found' raise Intercom::AuthenticationError.new(error_details['message'], error_context) when "bad_request", "missing_parameter", 'parameter_invalid', 'parameter_not_found' raise Intercom::BadRequestError.new(error_details['message'], error_context) + when "not_restorable" + raise Intercom::BlockedUser.new(error_details['message'], error_context) when "not_found" raise Intercom::ResourceNotFound.new(error_details['message'], error_context) when "rate_limit_exceeded" raise Intercom::RateLimitExceeded.new(error_details['message'], error_context) when 'service_unavailable'