S
S
Sergey750il2021-06-16 23:47:06
JavaScript
Sergey750il, 2021-06-16 23:47:06

How to display response on 500 error?

Good day. When a 500 error is received in the browser console, a message appears in the response tab with a description of this error. How to display this message? alert(error.message) doesn't output.

try {
        } catch (error) {
          alert(error.message);
        }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question