#include <limits.h>
Go to the source code of this file.
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). |
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().
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, GNUNET_ErrorCode_get_http_status(), and MHD_HTTP_INTERNAL_SERVER_ERROR.