File tree Expand file tree Collapse file tree 2 files changed +34
-36
lines changed
Expand file tree Collapse file tree 2 files changed +34
-36
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { URLExt } from '@jupyterlab/coreutils';
22import { ServerConnection } from '@jupyterlab/services' ;
33import { ReadonlyJSONObject } from '@lumino/coreutils' ;
44
5- import { DrivesResponseError } from './drivesError' ;
5+ // import { DrivesResponseError } from './drivesError';
66
77/**
88 * Array of Jupyter Drives Auth Error Messages.
@@ -15,6 +15,39 @@ export const AUTH_ERROR_MESSAGES = [
1515 'Authentication error'
1616] ;
1717
18+ /**
19+ * A wrapped error for a fetch response.
20+ */
21+ export class DrivesResponseError extends ServerConnection . ResponseError {
22+ /**
23+ * Create a new response error.
24+ */
25+ constructor (
26+ response : Response ,
27+ message = `Invalid response: ${ response . status } ${ response . statusText } ` ,
28+ traceback = '' ,
29+ json : ReadonlyJSONObject | null = { }
30+ ) {
31+ super ( response , message ) ;
32+ this . traceback = traceback ; // traceback added in mother class in 2.2.x
33+ this . _json = json ?? { } ;
34+ }
35+
36+ /**
37+ * The error response JSON body
38+ */
39+ get json ( ) : ReadonlyJSONObject {
40+ return this . _json ;
41+ }
42+
43+ /**
44+ * The traceback associated with the error.
45+ */
46+ traceback : string ;
47+
48+ protected _json : ReadonlyJSONObject ;
49+ }
50+
1851/**
1952 * Call the API extension
2053 *
You can’t perform that action at this time.
0 commit comments