File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ def raise_errors_on_failure(res)
8181 raise Intercom ::ResourceNotFound . new ( 'Resource Not Found' )
8282 elsif res . code . to_i . eql? ( 401 )
8383 raise Intercom ::AuthenticationError . new ( 'Unauthorized' )
84+ elsif res . code . to_i . eql? ( 403 )
85+ raise Intercom ::AuthenticationError . new ( 'Forbidden' )
8486 elsif res . code . to_i . eql? ( 500 )
8587 raise Intercom ::ServerError . new ( 'Server Error' )
8688 elsif res . code . to_i . eql? ( 502 )
@@ -100,7 +102,7 @@ def raise_application_errors_on_failure(error_list_details, http_code)
100102 :application_error_code => error_code
101103 }
102104 case error_code
103- when 'unauthorized'
105+ when 'unauthorized' , 'forbidden'
104106 raise Intercom ::AuthenticationError . new ( error_details [ 'message' ] , error_context )
105107 when "bad_request" , "missing_parameter" , 'parameter_invalid'
106108 raise Intercom ::BadRequestError . new ( error_details [ 'message' ] , error_context )
You can’t perform that action at this time.
0 commit comments