Skip to content

Could we be more helpful when response deserialization breaks? #280

Open
@Aaron-Hartwig

Description

This is rather unsporting:

root@oxz_switch0:~# xcvradm -i sidecar0 -t 0 vendor-info
Error: Failed to fetch vendor information for transceiver modules

Caused by:
    0: Controller protocol error
    1: Serialization failed

Can we be more helpful here? This port did not have a module installed at all, so the SP responded with a HwError::NotPresent, but this old version of Dendrite couldn't map that byte to a HwError.

This can happen when Dendrite's transceiver-messages is behind where the SP's is. So technically we handled this error and reported what we saw, but that isn't helpful. Most of the time when we've seen this thus far it is because we added a new HwError variant. In the case where our response size matches the size we expect, I think it would be helpful if we could just dump out the bytes that we can't decode.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions