Skip to content

[FEATURE REQUEST] Problem Case without Type and wrap errors that are usable with erros.Is(...) #2488

Open
@Dexus

Description

@Dexus

Sample:

_, err := os.ReadFile("/tmp/dat_not_found")
newProblem := iris.NewProblem().Wrap(err)

ctx.StopWithProblem(
    iris.StatusInternalError,
    iris.NewProblem().
        Key("error", true).
        Key("success", false).
        Title("Request failed").
        Detail("Processing did not finish").
        Cause(newProblem),
)
				

Maybe a Wrap thet will be output and one SilentWrap that is only for internal use.

Ref: https://github.com/mschneider82/problem/tree/master

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions