Skip to content

Provide more descriptive error messages when raising exceptions #59

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

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

mcls
Copy link
Contributor

@mcls mcls commented May 18, 2021

Before this change the MessageBird::ErrorException always return the
same message in a stacktrace "MessageBird::ErrorException". Now it's
more descriptive and includes the error descriptions received from the
JSON payload.

This makes it a bit easier to debug when things go wrong.

mcls added 2 commits May 18, 2021 09:48
Before this change the MessageBird::ErrorException always return the
same message in a stacktrace "MessageBird::ErrorException". Now it's
more descriptive and includes the error descriptions received from the
JSON payload.
@marcelcorso
Copy link
Contributor

thank you @mcls. This looks like a great improvement.

I'm sorry but my ruby is very rusty. Can you maybe show us how did errors look before and how did they look after your PR?

@mcls
Copy link
Contributor Author

mcls commented May 18, 2021 via email

@marcelcorso
Copy link
Contributor

ah that's clear @mcls! This will improve the user experience. Very nice.

I had an idea: What do you think about instead defining a message method we override the to_s method?

@mcls
Copy link
Contributor Author

mcls commented May 18, 2021 via email

@marcelcorso
Copy link
Contributor

oh the standard error interface looks better. ok. So I think message is ok. Let's leave it like this.
thanks again!

@marcelcorso marcelcorso closed this Apr 5, 2022
@marcelcorso marcelcorso reopened this Apr 5, 2022
@marcelcorso marcelcorso merged commit bb63d1f into messagebird:master Apr 5, 2022
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

Successfully merging this pull request may close these issues.

2 participants