-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update error handling documentation. #185
Comments
@nrathi |
Ah, thanks, that makes a lot more sense. I didn't understand why It looks like this is happening for
|
Do you just need to update this function: Line 389 in e940786
To check if all the "errors" are actually warnings? |
Yes, it's the function. I'll git blame and check why the warning is treated as error. I think it was a feature request... |
Is it the "firstError" feature request? Would you be open to creating a new 8.x.x release with the auth token fix? I am nervous about adding this wrapper to my entire integration. |
I would rather fix the "Warning" as "Error" treatment. I'll do an indeep investigation and testing and come back to you. |
Sounds good, keep me posted. In the worst case, can you confirm this looks safe to wrap all my calls with?
|
Hey, any update? Sorry to be a pain. Just started hitting this auth issue as I mentioned, so want to get a fix out ASAP. |
Hey Ill have time tomorrow |
I dig through the changes and the check for the "Failure" was mistakenly removed. Line 401 in a1e939a
|
@nrathi |
Yes, I took the update as soon as it came out! No issues on my end. |
I upgraded to 9.1.1 for an auth token fix, but saw that errors are handled differently now. I read through the documentation but it's not matching what I'm seeing in practice (for the Trading API).
The docs say:
In practice, what I'm seeing is:
If there are no errors with SeverityCode "Error" (as opposed to "Warning")
=> Then
error.meta
isEBayTraditionalErrorResponse & ExpectedResponseType
If there is an error with SeverityCode "Error"
=> Then
error.meta
isEBayTraditionalErrorResponse
Furthermore, I am not seeing
res
as a field onerror.meta
So for example, if you call
api.trading.UploadSiteHostedPictures
with an expected response type ofIUploadPictureResponse
and the pictures aren't high quality (warning, not error)Then the function will throw, and
error.Errors
will have the relevant warningAnd
error.meta
will be of the typeEBayTraditionalErrorResponse & ExpectedResponseType
Here's an example response:
Hopefully that makes sense.
The text was updated successfully, but these errors were encountered: