mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-18 11:40:48 +08:00
Merging from main
This commit is contained in:
@@ -20,7 +20,8 @@ export const post = (url: string, { arg: data }) => api.post(url, data).then((re
|
||||
api.interceptors.response.use(
|
||||
(response) => response,
|
||||
(error) => {
|
||||
throw new OasstError(error.message ?? error, error.error_code);
|
||||
const err = error?.response?.data;
|
||||
throw new OasstError(err?.message ?? error, err?.errorCode, error?.response?.httpStatusCode || -1);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user