Skip to content
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 #116

Closed
pcomp96 opened this issue Aug 25, 2023 · 1 comment
Closed

WhatsappApiException not expose the status code #116

pcomp96 opened this issue Aug 25, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@pcomp96
Copy link
Contributor

pcomp96 commented Aug 25, 2023

Sorry for the late reply @Bindambc,

I can modify the class WhatsappApiException by adding a method called getWhatsappApiError() that will allow obtaining the error object. Within the error object, you will be able to check the error codes sent by WhatsApp API.

Yes is perfect because the class WhatsappApiException return only the message of the exception throwed from API.

I could also return the HTTP code, but I'm not sure if it would be helpful. Note that in the case of media not found, the HTTP code is 400.

I think that is the best way to register the HTTP status code in the WhatsappApiError and expose it with public int getHttpStatusCode().

I hope that is useful 😀.

Thanks,
Giuseppe.

Originally posted by @pcomp96 in #107 (comment)

@Bindambc Bindambc added the enhancement New feature or request label Sep 5, 2023
@Bindambc
Copy link
Owner

Bindambc commented May 7, 2024

#168

@Bindambc Bindambc closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants