What Javascript/other tools would you use to convert a JSON response code (“400”) into an object? That is, if there’s no other content, but I want to “generate” content out of the status code.
Page 1 / 1
Maybe try using try-catch to handle that error?
In the catch section of your code, you should be able to use the error message.
Here's a link to try-catch:
https://www.w3schools.com/js/js_errors.asp
Hey
Were you able to get things going with the information from Jhealyn, or can we still help here?
I believe the Try-Catch recommendation would be a solid place to start for catching errors. The main difference from the example is that you want to return a JSON object vs generating HTML into an HTML p tag.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.