Skip to content

Implement the Go HTTP error and Problem Details API #24

Done

Description

@KyleJune

Start from main after #22 merges. Add github.com/udibo/http-error/go under go/. Provide one options-style constructor, a Go error with cause unwrapping, and net/http response parsing and writing. Preserve optional empty and false values. Use the shared defaults for every status from 400 through 599.

detail is the exposed message. Hide private 5xx details. From must discard source headers. Preserve repeated fields on outgoing responses, including distinct Set-Cookie values. Match standard JSON members exactly and preserve extensions according to the I-JSON number contract. Document the exported API and Go-specific decisions in go/EXPORTS.md and go/PORTING.md.

Part of udibo/oauth2#419.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions