瀏覽代碼

accept 202 status code (fix #1899)

Gildas 3 周之前
父節點
當前提交
b3a4a75cf6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/lib/rest-form-api/index.js

+ 1 - 1
src/lib/rest-form-api/index.js

@@ -59,7 +59,7 @@ class RestFormApi {
 			headers: this.headers,
 			signal: this.controller.signal
 		});
-		if ([200, 201].includes(response.status)) {
+		if ([200, 201, 202].includes(response.status)) {
 			return response.json();
 		} else {
 			throw new Error(await response.text());