Преглед изворни кода

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