-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
WhatsappApiException not expose the status code #107
Comments
Hello @pcomp96 , I can modify the class Could this help you? |
@pcomp96 |
Sorry for the late reply @Bindambc,
Yes is perfect because the class
I think that is the best way to register the HTTP status code in the I hope that is useful 😀. Thanks, |
Hi @Bindambc,
I resumed developing the integration I was implementing, while I was wrapping the CRUD API of the whatsapp media files to expose them to the integrating system, I noticed that the WhatsappApiException class has the WhatsappApiError object as a private member. It does not have a method that returns the status code of the checked exception. Being a REST call, it would need a
getStatusCode
method at least to return the status code occurred in the call.The API I'm testing is the
retrieveMediaUrl
by mediaId.When I call the API with an ID that doesn't exist I would like to return 404 from my API but I have no way to discriminate that
Using a provider, In this case, i catch the exception but i have to return 500 because i don't have the status code.
The exception I get is the following.
Would it be expensive to add a
statusCode
return?Waiting for your reply, I hope I was helpful.
Thank you,
Giuseppe
The text was updated successfully, but these errors were encountered: