Update message on access forbidden

This commit is contained in:
Quentin de Quelen 2019-12-12 15:39:32 +01:00
parent 88b3c05155
commit bf80729e17
2 changed files with 2 additions and 2 deletions

View File

@ -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) => {

View File

@ -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(())