From: erickson Date: Thu, 21 Jul 2005 16:53:02 +0000 (+0000) Subject: fixed issue where the err message was not getting set correctly X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3d6dbb4e9f393fb2feb3570c13f37a1054517da3;p=opensrf%2Fbjwebb.git fixed issue where the err message was not getting set correctly git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@410 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/gateway/mod_ils_gateway.c b/src/gateway/mod_ils_gateway.c index e6f15e9..f637710 100644 --- a/src/gateway/mod_ils_gateway.c +++ b/src/gateway/mod_ils_gateway.c @@ -318,6 +318,7 @@ static int mod_ils_gateway_method_handler (request_rec *r) { buffer_add( exc_buffer, "\nStatus: " ); buffer_add( exc_buffer, omsg->status_text ); buffer_add( exc_buffer, "\nStatus: " ); + char code[16]; memset(code, 0, 16); sprintf( code, "%d", omsg->status_code ); @@ -330,9 +331,10 @@ static int mod_ils_gateway_method_handler (request_rec *r) { json_object_object_add( exception, "err_msg", json_object_new_string(exc_buffer->buf)); */ + exception = json_parse_string("{}"); exception->add_key(exception, "is_err", json_parse_string("1")); - exception->add_key(exception, "err_msg", json_parse_string(exc_buffer->buf)); + exception->add_key(exception, "err_msg", new_object(exc_buffer->buf) ); warning_handler("*** Looks like we got a " "server exception\n%s", exc_buffer->buf );