forked from TrueCloudLab/frostfs-sdk-go
[#127] apistatus: Support WRONG_MAGIC_NUMBER status
Define `WrongMagicNumber` type for which encapsulates the work with incorrect network magic. Provide method to read/write the correct magic (which is a status detail in NeoFS API V2 protocol). Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
883a26d210
commit
0fb22361a3
6 changed files with 121 additions and 3 deletions
|
@ -44,6 +44,8 @@ func FromStatusV2(st *status.Status) Status {
|
|||
switch status.LocalizeCommonFail(&code); code {
|
||||
case status.Internal:
|
||||
decoder = new(ServerInternal)
|
||||
case status.WrongMagicNumber:
|
||||
decoder = new(WrongMagicNumber)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue