MCPcopy Index your code
hub / github.com/coder/coder / failedJobf

Method failedJobf

provisionerd/runner/runner.go:1132–1147  ·  view source on GitHub ↗
(format string, args ...interface{})

Source from the content-addressed store, hash-verified

1130}
1131
1132func (r *Runner) failedJobf(format string, args ...interface{}) *proto.FailedJob {
1133 message := fmt.Sprintf(format, args...)
1134 var code string
1135
1136 for c, m := range errorCodes {
1137 if strings.Contains(message, m) {
1138 code = c
1139 break
1140 }
1141 }
1142 return &proto.FailedJob{
1143 JobId: r.job.JobId,
1144 Error: message,
1145 ErrorCode: code,
1146 }
1147}
1148
1149func (r *Runner) startTrace(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) {
1150 return r.tracer.Start(ctx, name, append(opts, trace.WithAttributes(

Callers 13

applyMethod · 0.95
initMethod · 0.95
RunMethod · 0.95
doCleanFinishMethod · 0.95
doMethod · 0.95
configureMethod · 0.95
heartbeatRoutineMethod · 0.95
runTemplateImportMethod · 0.95
runTemplateDryRunMethod · 0.95
commitQuotaMethod · 0.95
failedWorkspaceBuildfMethod · 0.95
planMethod · 0.95

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected