MCPcopy
hub / github.com/harness/harness / HandleError

Method HandleError

registry/app/api/handler/packages/handler.go:343–349  ·  view source on GitHub ↗
(ctx context.Context, w http.ResponseWriter, err error)

Source from the content-addressed store, hash-verified

341}
342
343func (h *handler) HandleError(ctx context.Context, w http.ResponseWriter, err error) {
344 if nil != err {
345 log.Error().Err(err).Ctx(ctx).Msgf("error: %v", err)
346 render.TranslatedUserError(ctx, w, err)
347 return
348 }
349}
350
351func LogError(errList errcode.Errors) {
352 for _, e1 := range errList {

Callers 15

DownloadFileMethod · 0.95
ListPackageTagMethod · 0.95
UploadPackageMethod · 0.95
DownloadPackageFileMethod · 0.95
AddPackageTagMethod · 0.95
UploadPackageFileMethod · 0.95
DownloadPackageFileMethod · 0.95
GetRepoDataMethod · 0.95
UploadPackageFileMethod · 0.95
DownloadPackageFileMethod · 0.95
DownloadPackageIndexMethod · 0.95

Calls 4

TranslatedUserErrorFunction · 0.92
MsgfMethod · 0.80
ErrMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected