From f0d408c29579e2e75c176187fdbc66e4eae8ab24 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 10 Jan 2023 14:33:46 +0100 Subject: [PATCH] update the system http error code to return an internal server error --- meilisearch-types/src/error.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meilisearch-types/src/error.rs b/meilisearch-types/src/error.rs index bd06e69e9..6038a79dd 100644 --- a/meilisearch-types/src/error.rs +++ b/meilisearch-types/src/error.rs @@ -254,12 +254,12 @@ impl Code { match self { // related to the setup - IoError => ErrCode::system("io_error", StatusCode::UNPROCESSABLE_ENTITY), + IoError => ErrCode::system("io_error", StatusCode::INTERNAL_SERVER_ERROR), TooManyOpenFiles => { - ErrCode::system("too_many_open_files", StatusCode::UNPROCESSABLE_ENTITY) + ErrCode::system("too_many_open_files", StatusCode::INTERNAL_SERVER_ERROR) } NoSpaceLeftOnDevice => { - ErrCode::system("no_space_left_on_device", StatusCode::UNPROCESSABLE_ENTITY) + ErrCode::system("no_space_left_on_device", StatusCode::INTERNAL_SERVER_ERROR) } // index related errors