adm: Fix error handling when contract not found #1211
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1211
Loading…
Reference in a new issue
No description provided.
Delete branch "achuprov/frostfs-node:bugfix/ftostfd-adm_panic_contact_id"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close: #1210
Signed-off-by: Alexander Chuprov a.chuprov@yadro.com
morph/GetContractByID: Fix error handling when contract not foundto WIP: morph/GetContractByID: Fix error handling when contract not found@ -433,2 +433,2 @@
cs, err := r.GetContractByID(1)
if err != nil {
cs, err := helper.GetContractByID(r, 1)
if cs != nil || err != nil {
Why do we need
!= nil
comparison here?@ -181,0 +185,4 @@
// However, if the returned state.Contract is nil, it returns an error indicating that the contract was not found.
// See https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/1210
func GetContractByID(r *management.ContractReader, id int32) (*state.Contract, error) {
nnsCs, err := r.GetContractByID(id)
It is no
nnsCs
longer, justcs
The component in commit seems wrong, should be just
adm:
58b2738702
toe651979c9c
e651979c9c
to78e3f4834b
WIP: morph/GetContractByID: Fix error handling when contract not foundto morph/GetContractByID: Fix error handling when contract not foundmorph/GetContractByID: Fix error handling when contract not foundto adm: Fix error handling when contract not found