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

Method Failed

coderd/database/dbfake/dbfake.go:264–274  ·  view source on GitHub ↗

Failed sets the provisioner job to a failed state. Use WithJobError and WithJobErrorCode options to set the error message and code. If no error message is provided, "failed" is used as the default.

(opts ...BuilderOption)

Source from the content-addressed store, hash-verified

262// WithJobErrorCode options to set the error message and code. If no error
263// message is provided, "failed" is used as the default.
264func (b WorkspaceBuildBuilder) Failed(opts ...BuilderOption) WorkspaceBuildBuilder {
265 //nolint: revive // returns modified struct
266 b.jobStatus = database.ProvisionerJobStatusFailed
267 for _, opt := range opts {
268 opt(&b)
269 }
270 if b.jobError == "" {
271 b.jobError = "failed"
272 }
273 return b
274}
275
276// Do generates all the resources associated with a workspace build.
277// Template and TemplateVersion will be optionally populated if no

Callers 7

DumpOnFailureFunction · 0.45
Test_ResolveRequestFunction · 0.45
TestInstrumentFunction · 0.45
fakeAgentAPIEchoFunction · 0.45

Calls

no outgoing calls

Tested by 6

Test_ResolveRequestFunction · 0.36
TestInstrumentFunction · 0.36
fakeAgentAPIEchoFunction · 0.36