-
Notifications
You must be signed in to change notification settings - Fork 734
Closed
zakyke/examples
#5
Description
app.use(function* (next){
try {
yield* next;
} catch (err) {
if (401 == err.status) {
this.status = 401;
this.body = 'cant haz that';
} else {
throw err;
}
}
});
==>
app.use(function *(next){
try {
yield next;
} catch (err) {
if (401 == err.status) {
this.status = 401;
this.set('WWW-Authenticate', 'Basic');
this.body = 'cant haz that';
} else {
throw err;
}
}
});
Metadata
Metadata
Assignees
Labels
No labels