kataras / kataras/iris

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

Open
#2,488 1 comment 0 reactions 1 assignee Claimed by @kataras View on GitHub
Dominant language
Go
Stars
25.6k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Sample:

```go

_, 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.