From 65d7ec5ac39add13d0331e7884ef1f9b0ab39abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandru=20B=C4=83lu=C8=9B?= Date: Tue, 9 Jul 2024 16:31:49 +0200 Subject: [PATCH] Include response exact reason in case of failure Fixes #156 --- src/nightscout/apiv1.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nightscout/apiv1.ts b/src/nightscout/apiv1.ts index 0541368..3d59a6e 100644 --- a/src/nightscout/apiv1.ts +++ b/src/nightscout/apiv1.ts @@ -56,7 +56,7 @@ export class Client implements NightscoutAPI if (resp.status !== 200) { - throw Error(`failed to post new entries: ${resp.statusText}`); + throw Error(`failed to post new entries: ${resp.statusText} ${resp.status}`); } return;