Display error log From response

#1

Hi There,

How to display error from response API to html?

like picture attached.
let say i want to display the error code/message error using alert.

thank you

#2

Parse the JSON, extract the message, display the message in an alert.