From f7270987eab4f7043ab31a839f8dc023be107803 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 9 Apr 2025 19:08:28 -0400 Subject: [PATCH] http: Trying to track down a rare 404 I get on save. --- src/httpd.js.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/httpd.js.c b/src/httpd.js.c index 69379318..3c38385f 100644 --- a/src/httpd.js.c +++ b/src/httpd.js.c @@ -1324,6 +1324,11 @@ static void _httpd_endpoint_save_work(tf_ssb_t* ssb, void* user_data) snprintf(save->blob_id, sizeof(save->blob_id), "%s", blob_id); save->response = 200; } + else + { + tf_printf("Blob store or property set failed.\n"); + save->response = 500; + } JS_FreeCString(context, new_app_str); JS_FreeValue(context, new_app_json); @@ -1340,7 +1345,7 @@ static void _httpd_endpoint_save_work(tf_ssb_t* ssb, void* user_data) } else { - save->response = 401; + save->response = 403; } tf_free(user_app); } @@ -1352,12 +1357,21 @@ static void _httpd_endpoint_save_work(tf_ssb_t* ssb, void* user_data) snprintf(save->blob_id, sizeof(save->blob_id), "%s", blob_id); save->response = 200; } + else + { + tf_printf("Blob store failed.\n"); + save->response = 500; + } } else { save->response = 400; } } + else + { + save->response = 401; + } tf_free((void*)session); JS_FreeCString(context, user_string);