mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-19 13:20:36 +08:00
Re-raise errors with throw instead of Promise.reject()
This commit is contained in:
parent
0295f5a487
commit
1e53c1f924
@ -129,9 +129,9 @@ define([
|
||||
// TODO: update IPEP27 to specify errors more precisely, so
|
||||
// that error types can be detected here with certainty.
|
||||
if (error.xhr.status === 400) {
|
||||
return Promise.reject(new Contents.DirectoryNotEmptyError());
|
||||
throw new Contents.DirectoryNotEmptyError();
|
||||
}
|
||||
return Promise.reject(error);
|
||||
throw error;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user