File tree Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ class HttpErrorAuthUnknown extends HttpErrorBase {
52
52
constructor ( method , res , body , spec ) {
53
53
super ( method , res , body , spec )
54
54
this . message = 'Unable to authenticate, need: ' + res . headers . get ( 'www-authenticate' )
55
- this . code = 'EAUTHUNOWN'
56
55
Error . captureStackTrace ( this , HttpErrorAuthUnknown )
57
56
}
58
57
}
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ test('Unexpected www-authenticate error', t => {
117
117
( ) => { throw new Error ( 'Should not have succeeded!' ) } ,
118
118
err => {
119
119
t . match ( err . body . error , / P a t - a - c a k e / ig, 'error body explains it' )
120
- t . equal ( err . code , 'EAUTHUNOWN ' , 'got a special pokemon ' )
120
+ t . equal ( err . code , 'E401 ' , 'Unknown auth errors are generic 401s ' )
121
121
}
122
122
)
123
123
} )
You can’t perform that action at this time.
0 commit comments