Skip to content

Commit 70c3b63

Browse files
committed
add service unavailable handling
1 parent 4074a35 commit 70c3b63

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/intercom/request.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ def raise_application_errors_on_failure(error_list_details, http_code)
110110
raise Intercom::ResourceNotFound.new(error_details['message'], error_context)
111111
when "rate_limit_exceeded"
112112
raise Intercom::RateLimitExceeded.new(error_details['message'], error_context)
113+
when 'service_unavailable'
114+
raise Intercom::ServiceUnavailableError.new(error_details['message'], error_context)
113115
when nil, ''
114116
raise Intercom::UnexpectedError.new(message_for_unexpected_error_without_type(error_details, parsed_http_code), error_context)
115117
else

0 commit comments

Comments
 (0)