mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init collectionid page
This commit is contained in:
parent
dea720c871
commit
27cd84127f
8 changed files with 126 additions and 2 deletions
|
|
@ -78,7 +78,7 @@ export const swrFetcher = async (url: string, body: any, router?: AppRouterInsta
|
|||
|
||||
export const errorHandling = (res: any) => {
|
||||
if (!res.ok) {
|
||||
const error: any = new Error(`Error ${res.status}: ${res.statusText}`, {});
|
||||
const error: any = new Error(`${res.status}: ${res.statusText}`, {});
|
||||
error.status = res.status;
|
||||
throw error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue