aboutsummaryrefslogtreecommitdiff
path: root/src/piesctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/piesctl.c')
-rw-r--r--src/piesctl.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/piesctl.c b/src/piesctl.c
index 4319946..8c4e2e1 100644
--- a/src/piesctl.c
+++ b/src/piesctl.c
@@ -813,10 +813,9 @@ shttp_format_result (struct shttp_connection *conn, FILE *fp)
}
static void
-shttp_fatal (struct shttp_connection *conn)
+shttp_print_error (struct shttp_connection *conn)
{
struct json_value *jv;
- int status;
if (conn->result && (jv = json_value_lookup (conn->result, "error_message")))
{
@@ -827,11 +826,20 @@ shttp_fatal (struct shttp_connection *conn)
}
else
grecs_error (NULL, 0, "%s", conn->status_line[2]);
+}
+
+static void
+shttp_fatal (struct shttp_connection *conn)
+{
+ int status;
+
+ shttp_print_error (conn);
switch (conn->resp.code)
{
case 400:
case 405:
+ case 406:
case 501:
case 505:
grecs_error (NULL, 0, _("please report"));
@@ -975,6 +983,7 @@ shttp_process (struct shttp_connection *conn, int method, char const *uri)
case 404: /* Not found */
case 409: /* Conflict */
+ shttp_print_error (conn);
return;
default:

Return to:

Send suggestions and report system problems to the System administrator.