New error code for a unknown reserve public key.

Specific to the /reserve/status API.
This commit is contained in:
Marcello Stanisci 2018-05-22 12:42:02 +02:00
parent ce55e7c229
commit b84ba7074b
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
3 changed files with 9 additions and 4 deletions

View File

@ -154,9 +154,10 @@ TEH_RESERVE_handler_reserve_status (struct TEH_RequestHandler *rh,
if (NULL == rsc.rh)
return TEH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_NOT_FOUND,
"{s:s, s:s}",
"{s:s, s:s, s:I}",
"error", "Reserve not found",
"parameter", "withdraw_pub");
"parameter", "withdraw_pub",
"code", (json_int_t) TALER_EC_RESERVE_STATUS_UNKNOWN);
mhd_ret = reply_reserve_status_success (connection,
rsc.rh);
TEH_plugin->free_reserve_history (TEH_plugin->cls,

View File

@ -299,6 +299,12 @@ enum TALER_ErrorCode
*/
TALER_EC_RESERVE_STATUS_DB_ERROR = 1150,
/**
* The reserve status was requested using a unknown key,
* to be returned with 404 Not Found.
*/
TALER_EC_RESERVE_STATUS_UNKNOWN = 1151,
/**
* The respective coin did not have sufficient residual value

View File

@ -80,6 +80,4 @@ TALER_JSON_get_error_code (const json_t *json)
return TALER_EC_INVALID;
}
/* End of json/json.c */