#Anna-Accertify.api-errors
1 messages · Page 1 of 1 (latest)
oh sorry missed your reply
ok so Im working on integrating Stripe APIs for Retrieve Charge and all of the dispute related APIs only
I can see that when it comes to API errors they come via http codes, so the success would be 200 and failures either 400s or 500s errors
I have a couple of questions in regards to that. first is for the successful calls will we see any of the error messages in the error attributes at all or the error attributes will return blank when a call is successful?
Ok, got it! There will be no errors field in the response body of a successful API call
ok understood.
second question is in relation to the actual error code. the list is very long however since we will only be using Retrieve Charge and all of Dispute related APIs could you please specify which error codes refer to those APIs
Is this the list you're referring to? https://stripe.com/docs/error-codes
Wow, would be hard for me to specify which you can expect for just those endpoints
Is there a reason why you need to be so specific?
there is as I need to put special handling for each of them or at least for groups of them depending on how could they be resolved
hence I dont want to configure it for all of them as we wont see them all
I mean I can sort of work it our but was hoping that maybe there is some sort of guidance to confirm that my assumptions are correct
• lock_timeout
• rate_limit
• parameter_invalid_empty
• parameter_invalid_integer
• parameter_missing
• parameter_unknown
• url_invalid
• authentication_required
I think those are a good starting points, specifically unknown parameters if you're updating Dispute objects
Also when retrieving objects, if you pass an incorrect ID etc
Best way is to just test!
that is true, however it would be useful which scenario to test 😉 no worries we will work it out as we go
Only you know which scenarios your users are likely to encounter. Unfortunately there's no better way to show errors specific to different endpoints
No probs. It was worth to ask. Going back to my first question would you be able to share an example of a success API message please?Just to confirm when a call is successfully we will not see any of the error parameter fields at all or then will simply be blank?
Generally a successful API message will only contain the related object. This is highlighted in the API reference: https://stripe.com/docs/api/charges/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
See 'response' section on the right
ok
one last question, for http response codes other than 200 will we always receive Error Type field
on the webpage it states: Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.
so its says some rather than all
You'll always receive the error_type field yes
excellent. Thanks for all your help
Np!