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.

0.13 Error handling does not handle exceptions

See original GitHub issue

After upgrade from 0.12 to 0.13, catch method does not catch an error, an exception occurs and the whole process aborts.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:11
  • Comments:20 (5 by maintainers)

github_iconTop GitHub Comments

41reactions
nickuraltsevcommented, Aug 6, 2016

@SOSANA There is no ‘extra response object’ in your example.

When an Error is thrown, the response variable will contain the Error. I would suggest to rename that variable to error:

.catch(error => {
})

If a response has been received from the server, the error.response will contain a response object. The data property of the response object will contain the response payload. (See this for details about the response schema.)

.catch(error => {
  if (error.response) {
    // Response has been received from the server
    console.log(error.response.data); // => the response payload 
  }
})

Hope this helps!

24reactions
ghostcommented, Jul 18, 2016

Same here. There is some issues with the error object. Previously, we were able to retrieve the error object. We are facing issues now. I am rolling back to the previous version.

Below is the error message I get in the console:

Error: Request failed with status code 404
    at createError (eval at <anonymous> (https://localhost:8080/vendors.js:34:14382), <anonymous>:15:15)
    at settle (eval at <anonymous> (https://localhost:8080/vendors.js:59:22824), <anonymous>:18:12)
    at XMLHttpRequest.handleLoad (eval at <anonymous> (https://localhost:8080/vendors.js:34:48), <anonymous>:75:7)

In the previous version, I used to get the proper error object with status code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling — Flask-RESTPlus 0.13.0 documentation
The @api. errorhandler decorator allows you to register a specific handler for a given exception (or any exceptions inherited from it), in the...
Read more >
What is Exception Handling? - SearchSoftwareQuality
Exception handling is useful for dealing with exceptions that cannot be handled locally. Instead of showing an error status in the program, the...
Read more >
How to Handle Exceptions in Ruby - Rollbar
The simple guide to exception handling in Ruby. ✓ Harden your app against unexpected errors ✓ Respond more effectively ✓ Adapt to any ......
Read more >
Handle errors in ASP.NET Core | Microsoft Learn
This article covers common approaches to handling errors in ASP. ... The status code pages middleware does not catch exceptions.
Read more >
Battlestate Games (@bstategames) / Twitter
The installation of patch 0.13.0.0 has begun. It will take approximately 6 hours, but may be extended if required. The game will not...
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