Skip to content

no obvious way to log json unmarshal errors #83

@oryband

Description

@oryband

Let's say I have this code:

// Set main handler & context.
collectHandler :=
    tigertonic.Timed(
        corsBuilder.Build(
            tigertonic.WithContext(
                // Create context for handler.
                tigertonic.If(createContext, tigertonic.Marshaled(collect)),
                RequestContext{})),
        "Collect", nil)

If there's some JSON unmarshal problem in collect (which is a function with the correct signature), there's no obvious way to log it, besides wrapping everything with tigertonic.Logged(), which logs to much.

Is there a way to do that which I haven't figured out?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions