Skip to content

Commit

Permalink
Added error codes for funding sources errors
Browse files Browse the repository at this point in the history
  • Loading branch information
christian.casado committed Aug 7, 2024
1 parent 762e68a commit 2880093
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 11 additions & 1 deletion lib/shipengine/exceptions/error_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,17 @@ def self.get_by_str(str_key)
## ShipEngine only allows you to have one webhook of each type. If you would
## like to replace a webhook with a new one please delete the old one fir.
# #/
WEBHOOK_EVENT_TYPE_CONFLICT: 'webhook_event_type_conflict'
WEBHOOK_EVENT_TYPE_CONFLICT: 'webhook_event_type_conflict',

##
## Funding source isnt properly configured and can't be used.
# #/
FUNDING_SOURCE_MISSING_CONFIGURATION: 'funding_source_missing_configuration',

##
## There was an unexpected problem with a funding source.
# #/
FUNDING_SOURCE_ERROR: 'funding_source_error'
}.freeze
end
end
Expand Down
6 changes: 5 additions & 1 deletion lib/shipengine/exceptions/error_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ def self.get_by_str(str_key)
# that has not yet been assigned a specific error_type. If you receive
# persistent system errors, then please contact our support or check our API
# status page to see if there's a known issue.
SYSTEM: 'system'
SYSTEM: 'system',
# General wallet error type.
WALLET: 'wallet',
# General funding sources error type.
FUNDING_SOURCES: 'funding_sources'
}.freeze
end
end
Expand Down

0 comments on commit 2880093

Please sign in to comment.