File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,11 @@ async def list_drives(self):
6868 }
6969 else :
7070 response = {"code" : 400 , "message" : "No AWS credentials specified. Please set them in your user jupyter_server_config file." }
71-
71+ raise tornado .web .HTTPError (
72+ status_code = httpx .codes .BAD_REQUEST ,
73+ reason = "No AWS credentials specified. Please set them in your user jupyter_server_config file." ,
74+ )
75+
7276 return response
7377
7478 async def mount_drive (self , drive_name ):
Original file line number Diff line number Diff line change @@ -161,9 +161,8 @@ const drivesListProvider: JupyterFrontEndPlugin<IDriveInfo[]> = {
161161 provides : IDrivesList ,
162162 activate : async ( _ : JupyterFrontEnd ) : Promise < IDriveInfo [ ] > => {
163163 const drives : IDriveInfo [ ] = [ ] ;
164-
165- const response = await getDrivesList ( ) ;
166- if ( response . code === 200 ) {
164+ try {
165+ const response = await getDrivesList ( ) ;
167166 for ( const drive of response . data ) {
168167 drives . push ( {
169168 name : drive . name ,
@@ -172,8 +171,8 @@ const drivesListProvider: JupyterFrontEndPlugin<IDriveInfo[]> = {
172171 creationDate : drive . creation_date
173172 } ) ;
174173 }
175- } else {
176- console . log ( response . message ) ;
174+ } catch {
175+ console . log ( 'Failed loading available drives list.' ) ;
177176 }
178177 return drives ;
179178 }
You can’t perform that action at this time.
0 commit comments