#include <limits.h>
Go to the source code of this file.
Enumerations | |
enum | GNUNET_ErrorCode { GNUNET_EC_NONE = 0 , GNUNET_EC_UNKNOWN = 1 , GNUNET_EC_SERVICE_COMMUNICATION_FAILED = 101 , GNUNET_EC_IDENTITY_NOT_FOUND = 200 , GNUNET_EC_IDENTITY_NAME_CONFLICT = 201 , GNUNET_EC_IDENTITY_INVALID = 202 , GNUNET_EC_NAMESTORE_UNKNOWN = 5000 , GNUNET_EC_NAMESTORE_ITERATION_FAILED = 5001 , GNUNET_EC_NAMESTORE_ZONE_NOT_FOUND = 5002 , GNUNET_EC_NAMESTORE_RECORD_NOT_FOUND = 5003 , GNUNET_EC_NAMESTORE_RECORD_DELETE_FAILED = 5004 , GNUNET_EC_NAMESTORE_ZONE_EMPTY = 5005 , GNUNET_EC_NAMESTORE_LOOKUP_ERROR = 5006 , GNUNET_EC_NAMESTORE_NO_RECORDS_GIVEN = 5007 , GNUNET_EC_NAMESTORE_RECORD_DATA_INVALID = 5008 , GNUNET_EC_NAMESTORE_NO_LABEL_GIVEN = 5009 , GNUNET_EC_NAMESTORE_NO_RESULTS = 5010 , GNUNET_EC_NAMESTORE_RECORD_EXISTS = 5011 , GNUNET_EC_NAMESTORE_RECORD_TOO_BIG = 5012 , GNUNET_EC_NAMESTORE_BACKEND_FAILED = 5013 , GNUNET_EC_NAMESTORE_STORE_FAILED = 5014 , GNUNET_EC_NAMESTORE_LABEL_INVALID = 5015 } |
Taler error codes. More... | |
Functions | |
const char * | GNUNET_ErrorCode_get_hint (enum GNUNET_ErrorCode ec) |
Returns a hint for a given error code. More... | |
unsigned int | GNUNET_ErrorCode_get_http_status (enum GNUNET_ErrorCode ec) |
Return HTTP status for a given error code. More... | |
unsigned int | GNUNET_ErrorCode_get_http_status_safe (enum GNUNET_ErrorCode ec) |
Return HTTP status for a given error code that is guaranteed to work (no corner cases). More... | |
enum GNUNET_ErrorCode |
Taler error codes.
Enumerator | |
---|---|
GNUNET_EC_NONE | No error (success). Returned with an HTTP status code of MHD_HTTP_UNINITIALIZED (0). |
GNUNET_EC_UNKNOWN | Unknown and unspecified error. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_SERVICE_COMMUNICATION_FAILED | Communication with service failed. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_IDENTITY_NOT_FOUND | Ego not found. Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). |
GNUNET_EC_IDENTITY_NAME_CONFLICT | Identifier already in use for another ego. Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). |
GNUNET_EC_IDENTITY_INVALID | The given ego is invalid or malformed. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_NAMESTORE_UNKNOWN | Unknown namestore error. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_NAMESTORE_ITERATION_FAILED | Zone iteration failed. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_NAMESTORE_ZONE_NOT_FOUND | Zone not found. Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). |
GNUNET_EC_NAMESTORE_RECORD_NOT_FOUND | Record not found. Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). |
GNUNET_EC_NAMESTORE_RECORD_DELETE_FAILED | Zone iteration failed. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_NAMESTORE_ZONE_EMPTY | Zone does not contain any records. Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). |
GNUNET_EC_NAMESTORE_LOOKUP_ERROR | Failed to lookup record. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_NAMESTORE_NO_RECORDS_GIVEN | No records given. Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400). |
GNUNET_EC_NAMESTORE_RECORD_DATA_INVALID | Record data invalid. Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400). |
GNUNET_EC_NAMESTORE_NO_LABEL_GIVEN | No label given. Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400). |
GNUNET_EC_NAMESTORE_NO_RESULTS | No results given. Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). |
GNUNET_EC_NAMESTORE_RECORD_EXISTS | Record already exists. Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). |
GNUNET_EC_NAMESTORE_RECORD_TOO_BIG | Record size exceeds maximum limit. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_NAMESTORE_BACKEND_FAILED | There was an error in the database backend. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_NAMESTORE_STORE_FAILED | Failed to store the given records. Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). |
GNUNET_EC_NAMESTORE_LABEL_INVALID | Label invalid or malformed. Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400). |
Definition at line 42 of file gnunet_error_codes.h.
const char * GNUNET_ErrorCode_get_hint | ( | enum GNUNET_ErrorCode | ec | ) |
Returns a hint for a given error code.
ec | the error code. |
Definition at line 201 of file gnunet_error_codes.c.
References code_hint_pairs, code_hint_pairs_length, ErrorCodeAndHint::ec, and ErrorCodeAndHint::hint.
Referenced by add_continuation(), attr_store_cont(), create_did_ego_create_cb(), create_finished(), cred_store_cont(), del_attr_finished(), del_continuation(), delete_finished(), DID_create_did_store_cb(), do_error(), handle_generic_response(), handle_zone_to_name_response(), marked_deleted(), move_attr_finished(), origin_create_cb(), remove_did_document_namestore_cb(), remove_ticket_cont(), replace_cont(), send_result_code(), and store_completed_cb().
unsigned int GNUNET_ErrorCode_get_http_status | ( | enum GNUNET_ErrorCode | ec | ) |
Return HTTP status for a given error code.
ec | the error code. |
Definition at line 227 of file gnunet_error_codes.c.
References code_hint_pairs, code_hint_pairs_length, ErrorCodeAndHint::ec, and ErrorCodeAndHint::http_code.
Referenced by do_error(), and GNUNET_ErrorCode_get_http_status_safe().
unsigned int GNUNET_ErrorCode_get_http_status_safe | ( | enum GNUNET_ErrorCode | ec | ) |
Return HTTP status for a given error code that is guaranteed to work (no corner cases).
ec | the error code. |
Definition at line 253 of file gnunet_error_codes.c.
References ErrorCodeAndHint::ec, and GNUNET_ErrorCode_get_http_status().