瀏覽代碼

fix(api): добавлено исключение для 422 кодов

horanchikk 5 月之前
父節點
當前提交
7fd55ecf88
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      repository/api.ts

+ 1 - 1
repository/api.ts

@@ -59,7 +59,7 @@ export class API {
     },
     onResponse: (ctx) => {
       const statusCode = ctx.response.status
-      if (statusCode > 300)
+      if (statusCode > 300 && statusCode !== 422)
         this.throwError(ctx.request.toString(), ctx.response._data)
     },
     onResponseError: async (ctx) => {