Skip to content

Commit 170b805

Browse files
committed
update mount function to return error message
1 parent de4f5a7 commit 170b805

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/requests.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@ export async function mountDrive(
7373
drive_name: driveName,
7474
provider: options.provider
7575
};
76-
return await requestAPI<any>('drives', 'POST', body);
76+
try {
77+
await requestAPI<any>('drives', 'POST', body);
78+
} catch (error: any) {
79+
return {
80+
error: error
81+
};
82+
}
83+
84+
return;
7785
}
7886

7987
/**

0 commit comments

Comments
 (0)