Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Error code registry. #119

@Lukasa

Description

@Lukasa

Right now if we get an unexpected GOAWAY we print this in the exception hyper.http20.exceptions.ConnectionError: Encountered error 12, extra data b''.. This is fine, but we can do better.

We should bring in the error code registry from the spec so that we can print something more like this: hyper.http20.exceptions.ConnectionError: Error INADEQUATE_SECURITY (0xc): Negotiated TLS parameters not acceptable.

Ideally, the exception itself should be more structured, allowing easy access to numerical error codes, textual error names, long-form error descriptions, and the extra data.

I suspect the format string is roughly going to be "Error {s:name} ({d:errno}): {s:long_error}", where long_error is the extra data if it's available, and the description from the spec if it's not available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions