mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-24 13:40:31 +01:00
Update message on access forbidden
This commit is contained in:
parent
88b3c05155
commit
bf80729e17
@ -79,7 +79,7 @@ impl IntoResponse for ResponseError {
|
||||
error(err, StatusCode::BAD_REQUEST)
|
||||
}
|
||||
ResponseError::InvalidToken(err) => {
|
||||
error(format!("Invalid Token: {}", err), StatusCode::FORBIDDEN)
|
||||
error(format!("Invalid API key: {}", err), StatusCode::FORBIDDEN)
|
||||
}
|
||||
ResponseError::NotFound(err) => error(err, StatusCode::NOT_FOUND),
|
||||
ResponseError::IndexNotFound(index) => {
|
||||
|
@ -66,7 +66,7 @@ impl ContextExt for Context<Data> {
|
||||
}
|
||||
|
||||
if !token_config.acl.contains(&acl) {
|
||||
return Err(ResponseError::invalid_token("token do not have this ACL"));
|
||||
return Err(ResponseError::invalid_token("no permission"));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
Loading…
x
Reference in New Issue
Block a user