question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve error format consistency

See original GitHub issue

Currently errors come in either as:

  • The error object in a callback, with a message attributes
  • The error object in a callback, with a error-code and error-code-label attribute
  • The response object in a callback, with a status attribute with a value of 0

This is causing a lot of headache when used (see nexmo/nexmo-cli#104).

I propose we instead return an error object and only an error object if an error occurred, and a response object and only a response object if no errors occurred. This would also bring the library more in line with how Promises work down the line if we want to go that way.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pardelcommented, Nov 11, 2022

@cbetta better late than never 😉

1reaction
manchuckcommented, Nov 9, 2022

@cbetta If you update to V3, we are throwing errors as we have migrated to using promises. This should no longer be an issue for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Top 10 Consistency Mistakes - PerfectIt
Automate Your Consistency Checks for Error-free Documents​​ However, the best way to improve consistency in documents is to run PerfectIt. The ...
Read more >
Three ways to expose formatting inconsistencies in a Word ...
Whether you're sharing new documents or revamping old ones, these three tools can reveal troublesome formatting problems.
Read more >
Blue wavy lines that appear under text indicate Format ...
The Format Consistency Checker checks for any change in font property. Indentation differences must be less than or equal to .249 inches. Rule...
Read more >
5 Data Quality Best Practices for Consistent and Error-Free Data
1. Establish metrics · 2. Perform data quality post-mortems · 3. Educate your organization · 4. Establish consistent procedures · 5. Perform data ......
Read more >
Consistency Errors | Mendix Documentation
Describes consistency errors in Mendix Studio and the way to fix them.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found