replace existing_index with index_already_exists

This commit is contained in:
mpostma 2020-05-29 16:28:11 +02:00
parent db45826232
commit 68ad570cfc

View File

@ -87,7 +87,7 @@ impl Code {
match self { match self {
// index related errors // index related errors
CreateIndex => ErrCode::invalid("create_index", StatusCode::BAD_REQUEST), CreateIndex => ErrCode::invalid("create_index", StatusCode::BAD_REQUEST),
IndexAlreadyExists => ErrCode::invalid("existing_index", StatusCode::BAD_REQUEST), IndexAlreadyExists => ErrCode::invalid("index_already_exists", StatusCode::BAD_REQUEST),
IndexNotFound => ErrCode::invalid("index_not_found", StatusCode::NOT_FOUND), InvalidIndexUid => ErrCode::invalid("invalid_index_uid", StatusCode::BAD_REQUEST), IndexNotFound => ErrCode::invalid("index_not_found", StatusCode::NOT_FOUND), InvalidIndexUid => ErrCode::invalid("invalid_index_uid", StatusCode::BAD_REQUEST),
OpenIndex => ErrCode::internal("open_index", StatusCode::INTERNAL_SERVER_ERROR), OpenIndex => ErrCode::internal("open_index", StatusCode::INTERNAL_SERVER_ERROR),