소스 검색

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) => {