MCPcopy
hub / github.com/harness/harness / TranslatedUserError

Function TranslatedUserError

app/api/render/render_error.go:27–29  ·  view source on GitHub ↗

TranslatedUserError writes the translated user error of the provided error.

(ctx context.Context, w http.ResponseWriter, err error)

Source from the content-addressed store, hash-verified

25
26// TranslatedUserError writes the translated user error of the provided error.
27func TranslatedUserError(ctx context.Context, w http.ResponseWriter, err error) {
28 UserError(ctx, w, usererror.Translate(ctx, err))
29}
30
31// NotFound writes the json-encoded message for a not found error.
32func NotFound(ctx context.Context, w http.ResponseWriter) {

Callers 15

CheckQuarantineStatusFunction · 0.92
RequestPackageAccessFunction · 0.92
StoreArtifactInfoFunction · 0.92
HandleErrorMethod · 0.92
PackageMetadataMethod · 0.92
GetTokenMethod · 0.92
GetRepoDataMethod · 0.92
GitPathBeforeFunction · 0.92
TerminatedPathBeforeFunction · 0.92
MiddlewareFunction · 0.92
HandleFindFunction · 0.92

Calls 2

TranslateFunction · 0.92
UserErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…