diff --git a/Koha/REST/Plugin/Exceptions.pm b/Koha/REST/Plugin/Exceptions.pm index e9be043aa2..b069711596 100644 --- a/Koha/REST/Plugin/Exceptions.pm +++ b/Koha/REST/Plugin/Exceptions.pm @@ -76,11 +76,11 @@ sub register { status => 500, openapi => { error => - "Something went wrong, check Koha logs for details." + "Something went wrong, check Koha logs for details.", + error_code => 'internal_server_error', } ); - } - + } ); } diff --git a/api/v1/swagger/definitions/error.yaml b/api/v1/swagger/definitions/error.yaml index 8576374a8b..8f52da4c13 100644 --- a/api/v1/swagger/definitions/error.yaml +++ b/api/v1/swagger/definitions/error.yaml @@ -4,4 +4,7 @@ properties: error: description: Error message type: string + error_code: + description: Error code + type: string additionalProperties: true