T
T
Tolych2017-02-03 18:23:24
Express.js
Tolych, 2017-02-03 18:23:24

How to catch and display an error generated by the backend in a div block?

There is a backend on express js, the connect-role module is used, some kind of midlware that looks, the user has rights to view some page. If not, it generates an error 423, with the text "Access denied, you must to..."
How to catch this error and display its text in some div block?
What are the approaches to solve this problem?

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