]>
git.r.bdr.sh - rbdr/forum/blob - lib/middleware/handle_errors.js
2 * Middleware to create responses for unhandled errors.
4 export default async
function HandleErrors(next
) {
10 this.status
= err
.status
|| 500;
17 if (response
.status
=== 401) {
18 response
.error
=== 'Protected resource, use Authorization header to get access';
23 this.app
.emit('error', err
, this);