From 67bc8863353951c0a1cfc6bdd355232c64239cfc Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Tue, 20 Feb 2024 23:00:16 -0300 Subject: [PATCH] fix(basic.gblib): POST/PUT bug fix. @othonlima --- packages/basic.gblib/services/SystemKeywords.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/basic.gblib/services/SystemKeywords.ts b/packages/basic.gblib/services/SystemKeywords.ts index 99fd136d..6b151f34 100644 --- a/packages/basic.gblib/services/SystemKeywords.ts +++ b/packages/basic.gblib/services/SystemKeywords.ts @@ -1875,7 +1875,7 @@ export class SystemKeywords { const text = await result.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}.`) } @@ -1910,7 +1910,7 @@ export class SystemKeywords { const text = await result.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}.`) }