chore: return json body under http status 401 (#2924)

* chore: change auth_fn to function and return response with json body

* chore: move unsupported to debug level

* chore: add docs and tests

* chore: rebase and update test
This commit is contained in:
shuiyisong
2023-12-14 10:01:12 +00:00
committed by GitHub
parent 518bac35bc
commit 5dba373ede
5 changed files with 139 additions and 120 deletions
+1 -1
View File
@@ -138,7 +138,6 @@ impl StatusCode {
pub fn should_log_error(&self) -> bool {
match self {
StatusCode::Unknown
| StatusCode::Unsupported
| StatusCode::Unexpected
| StatusCode::Internal
| StatusCode::Cancelled
@@ -147,6 +146,7 @@ impl StatusCode {
| StatusCode::StorageUnavailable
| StatusCode::RuntimeResourcesExhausted => true,
StatusCode::Success
| StatusCode::Unsupported
| StatusCode::InvalidArguments
| StatusCode::InvalidSyntax
| StatusCode::TableAlreadyExists