Unverified Commit 153acc6c authored by Johan Stokking's avatar Johan Stokking Committed by GitHub
Browse files

Return UnknownDevAddr and MICFailed errors in roaming. (#574)

parent 09a2d645
......@@ -589,5 +589,14 @@ func (a *API) getBasePayloadResult(basePLReq backend.BasePayload, resCode backen
}
func (a *API) errToResultCode(err error) backend.ResultCode {
return backend.Other
switch {
case errors.Is(err, storage.ErrDoesNotExist):
return backend.UnknownDevAddr
case errors.Is(err, storage.ErrFrameCounterReset),
errors.Is(err, storage.ErrFrameCounterRetransmission),
errors.Is(err, storage.ErrInvalidMIC):
return backend.MICFailed
default:
return backend.Other
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment