| 1 |
htmx.on('htmx:responseError', function (evt) { |
| 2 |
// 403=Forbidden |
| 3 |
console.log(evt.detail.xhr.response); |
| 4 |
console.log(evt.detail.xhr.responseText); |
| 5 |
alert('Received error from server (code=' + evt.detail.xhr.status + ') - see console'); |
| 6 |
}); |
| 7 |
htmx.on('htmx:sendError', function (evt) { |
| 8 |
alert('Could not send data to server'); |
| 9 |
}); |
| 10 |
|