mirror of
https://code.forgejo.org/forgejo/upload-artifact.git
synced 2024-11-08 18:32:40 +00:00
more
This commit is contained in:
parent
d48048aac5
commit
7aec5deb0e
1 changed files with 6 additions and 1 deletions
7
dist/index.js
vendored
7
dist/index.js
vendored
|
@ -5646,8 +5646,13 @@ class ArtifactHttpClient {
|
||||||
'Content-Type': contentType
|
'Content-Type': contentType
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
const response = yield this.retryableRequest(() => __awaiter(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); }));
|
// const response = await this.retryableRequest(async () =>
|
||||||
|
const response = yield this.httpClient.post(url, JSON.stringify(data), headers);
|
||||||
const body = yield response.readBody();
|
const body = yield response.readBody();
|
||||||
|
(0, core_1.debug)(`[Response] ${body}`);
|
||||||
|
if (response.message.statusCode !== 200) {
|
||||||
|
throw new Error(`Non-200: ${response.message.statusCode}`);
|
||||||
|
}
|
||||||
return JSON.parse(body);
|
return JSON.parse(body);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue