feat: propagate job error codes (#6507)

* feat: propagate job error_code

* fix

* Fix

* Fix

* Fix

* add errors to typesGenerated

* Address PR comments

* Fix
This commit is contained in:
Marcin Tojek
2023-03-08 16:32:00 +01:00
committed by GitHub
parent 524b14adbc
commit 3b87316ad7
25 changed files with 406 additions and 234 deletions

22
coderd/apidoc/docs.go generated
View File

@ -6825,6 +6825,17 @@ const docTemplate = `{
}
}
},
"codersdk.JobErrorCode": {
"type": "string",
"enum": [
"MISSING_TEMPLATE_PARAMETER",
"REQUIRED_TEMPLATE_VARIABLES"
],
"x-enum-varnames": [
"MissingTemplateParameter",
"RequiredTemplateVariables"
]
},
"codersdk.License": {
"type": "object",
"properties": {
@ -7362,6 +7373,17 @@ const docTemplate = `{
"error": {
"type": "string"
},
"error_code": {
"enum": [
"MISSING_TEMPLATE_PARAMETER",
"REQUIRED_TEMPLATE_VARIABLES"
],
"allOf": [
{
"$ref": "#/definitions/codersdk.JobErrorCode"
}
]
},
"file_id": {
"type": "string",
"format": "uuid"