commit 361d9cc127ae828867fb18bbaf07fa4dfb871c11
parent 4646faecf4e60be3bf71c4d6400123375294c34e
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Wed, 9 Oct 2024 18:39:32 -0700
Fallback to performing a PUT if PATCH fails
While PUT shouldn't succeed if PATCH fails, if PATCH should be buggy
(which it is right now) hopefully this will prevent issues for the
users.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/files/floorplans/floorplan/backend.js b/files/floorplans/floorplan/backend.js
@@ -706,6 +706,10 @@ export class FloorplanBackend {
}
backend.cb("push")
})
+ .catch(function(err) {
+ console.error("Unable to PATCH floorplan, trying PUT", err)
+ backend.putServer()
+ })
}
putServer() {