fix(basic.gblib): POST/PUT bug fix. @othonlima
This commit is contained in:
parent
57a33f8461
commit
67bc886335
1 changed files with 2 additions and 2 deletions
|
@ -1875,7 +1875,7 @@ export class SystemKeywords {
|
||||||
const text = await result.text();
|
const text = await result.text();
|
||||||
GBLog.info(`BASIC: PUT ${url} (${data}): ${text}`);
|
GBLog.info(`BASIC: PUT ${url} (${data}): ${text}`);
|
||||||
|
|
||||||
if (result.status != 200) {
|
if (result.status != 200 && result.status != 201) {
|
||||||
throw new Error(`BASIC: PUT ${result.status}: ${result.statusText}.`)
|
throw new Error(`BASIC: PUT ${result.status}: ${result.statusText}.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1910,7 +1910,7 @@ export class SystemKeywords {
|
||||||
const text = await result.text();
|
const text = await result.text();
|
||||||
GBLog.info(`BASIC: POST ${url} (${data}): ${text}`);
|
GBLog.info(`BASIC: POST ${url} (${data}): ${text}`);
|
||||||
|
|
||||||
if (result.status != 200) {
|
if (result.status != 200 && result.status != 201) {
|
||||||
throw new Error(`BASIC: POST ${result.status}: ${result.statusText}.`)
|
throw new Error(`BASIC: POST ${result.status}: ${result.statusText}.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue