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

Error not printing #114

Open
abdugaliyev opened this issue Dec 4, 2023 · 3 comments
Open

Error not printing #114

abdugaliyev opened this issue Dec 4, 2023 · 3 comments

Comments

@abdugaliyev
Copy link

Describe the bug
Every time when i get error my code print Error: #WhatsappSdk::Api::Responses::MessageErrorResponse:0x00007fb9a00fc9e8

message_response = messages_api.send_text(
                sender_id: sender_id,
                recipient_number: from.to_i,
                message: send_message,
              )

              if message_response.ok?
                puts "Message sent to: #{message_response.data.contacts.first.input}"

                # to = message_response.data.contacts.first.input
              else
                puts "Error: #{message_response.error&.to_s}"
              end

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

@ignacio-chiazzo
Copy link
Owner

Hi, thanks for reporting. Could you elaborate more on which error are you getting? what's the error message?

@abdugaliyev
Copy link
Author

abdugaliyev commented Dec 6, 2023

Hi! Thank you for a yours great job, and nice gem!
this code puts "Error: #{message_response.error&.to_s}"
print in console this:
Error: #WhatsappSdk::Api::Responses::MessageErrorResponse:0x00007f44f6a01580
for any error

@ignacio-chiazzo
Copy link
Owner

Hi, did you print the error message and code to see what the issue was?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants