From b11d5b2eb5fa5c11235c8fc57d090bc0cbe9bb6f Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 12 Jan 2016 11:53:55 +0100 Subject: [PATCH] Add new error codes to MatrixAPIError --- src/matrix-api-types.c | 4 ++++ src/matrix-api-types.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/matrix-api-types.c b/src/matrix-api-types.c index ca85713..f4ae089 100644 --- a/src/matrix-api-types.c +++ b/src/matrix-api-types.c @@ -44,6 +44,10 @@ * missing/invalid token, or using a bad * password during login) * @MATRIX_API_ERROR_UNKNOWN: an error unknown to the Matrix server + * @MATRIX_API_ERROR_UNKNOWN_TOKEN: the token provided is not known + * for the homeserver + * @MATRIX_API_ERROR_UNSPECIFIED: no error code was sent by the + * homeserver * @MATRIX_API_ERROR_UNKNOWN_ERROR: an error unknown to this library * * Value mappings from Matrix.org API error codes diff --git a/src/matrix-api-types.h b/src/matrix-api-types.h index 792edc4..2e45ba1 100644 --- a/src/matrix-api-types.h +++ b/src/matrix-api-types.h @@ -36,10 +36,12 @@ typedef enum { MATRIX_API_ERROR_MISSING_TOKEN = 500, MATRIX_API_ERROR_FORBIDDEN, MATRIX_API_ERROR_UNKNOWN, + MATRIX_API_ERROR_UNKNOWN_TOKEN, /* Allow for a lot of Matrix.org defined codes Do not define error codes after this! */ - MATRIX_API_ERROR_UNKNOWN_ERROR = 16384 + MATRIX_API_ERROR_UNSPECIFIED = 16383, + MATRIX_API_ERROR_UNKNOWN_ERROR } MatrixAPIError; #define MATRIX_API_ERROR matrix_api_error_quark()