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.

Question about error handling

See original GitHub issue

👋 , I have a quick question about error handling.

It seems like this library assumes that a data object is always returned in the json payload and does not handle the use case where there is a top level errors object per JSON API spec https://jsonapi.org/format/#document-top-level. Is this correct (maybe i’m missing something)? If so, is there a way you are currently handling error formatting in the json payload?

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yury-dymovcommented, Feb 7, 2019

@iansolano currently I don’t see any reasons why not to add support for this, so feel free to file a PR and I will be more than happy to review it

1reaction
yury-dymovcommented, Feb 7, 2019

Hey @iansolano, you are correct, library doesn’t handle errors. I suppose that if your payload returned error, you wouldn’t store the data in regular redux data reducer (and therefore normalize it) but rather dispatch some kind of error action instead.

Feel free to share if you have something on your mind.

Read more comments on GitHub >

github_iconTop Results From Across the Web

35 Java Exception Handling Interview Questions and Answers
Top Java Interview Questions on Exception Handling · Q1. How can you handle exceptions in Java? · Q2. What is the difference between...
Read more >
Top 30 Exception Handling Interview Questions and Answers ...
Top 30 Exception Handling Interview Questions and Answers [For Freshers & Experienced].
Read more >
30+ Java Exception Handling Interview Questions And Answers
30 Most Asked Java Exception Handling Interview Questions And Answers · 1) What is an exception? · 2) How the exceptions are handled...
Read more >
Java Exception Interview Questions and Answers | DigitalOcean
What is OutOfMemoryError in Java? What are different scenarios causing “Exception in thread main”? What is the difference between final, finally ...
Read more >
Top 50 Exception Handling Interview Questions and Answers ...
In this post, I will be sharing the top 50 exception handling interview questions and answers in java for freshers (0-1 years) and...
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