cubefs/blobstore/common/errors/access.go
mawei029 7b57e9d894 fix(bssdk): convert error code 5xx key not found
with: #22912998

Signed-off-by: mawei029 <mawei2@oppo.com>
2025-07-08 11:30:15 +08:00

41 lines
1.6 KiB
Go

// Copyright 2022 The CubeFS Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied. See the License for the specific language governing
// permissions and limitations under the License.
package errors
// code for access
const (
CodeAccessUnexpect = 550 // unexpect
CodeAccessServiceDiscovery = 551 // service discovery for access api client
CodeAccessExceedSize = 400 // exceed max size
CodeShardNotFound = 404 // not support shard node
CodeAccessLimited = 429 // read write limited for access api client
CodeAccessReadRequestBody = 466 // read request body error
CodeCallShardNodeFail = 467 // call shard node failed
CodeConnectionRefused = 468 //
)
// errro of access
var (
ErrAccessReadRequestBody = Error(CodeAccessReadRequestBody)
ErrAccessUnexpect = Error(CodeAccessUnexpect)
ErrAccessServiceDiscovery = Error(CodeAccessServiceDiscovery)
ErrAccessLimited = Error(CodeAccessLimited)
ErrAccessExceedSize = Error(CodeAccessExceedSize)
ErrAccessNotFoundShard = Error(CodeShardNotFound)
ErrCallShardNodeFail = Error(CodeCallShardNodeFail)
ErrConnectionRefused = Error(CodeConnectionRefused)
)