Skip to content

Commit

Permalink
add Err (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxxf18 committed Apr 21, 2021
1 parent c0b1887 commit a2f0543
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ const (

ErrResourceInvisible = "ErrResourceInvisible"
ErrConvertConflict = "ErrConvertConflict"

ErrPubsubTimeout = "ErrPubsubTimeout"
ErrUpdateSubLabels = "ErrUpdateSubLabels"
)

var templates = map[Code]string{
Expand Down Expand Up @@ -168,6 +171,9 @@ var templates = map[Code]string{

ErrResourceInvisible: "The {{if .type}}({{.type}}) {{end}}resource{{if .name}} ({{.name}}){{end}} is not visible.",
ErrConvertConflict: "Problem with converting {{if .name}} ({{.name}}){{end}}.{{if .error}} ({{.error}}){{end}}",

ErrPubsubTimeout: "Publish or subscribe message timeout. {{if .error}} ({{.error}}){{end}}",
ErrUpdateSubLabels: "Failed to update sub node labels. {{if .error}} ({{.error}}){{end}}",
}

func getHTTPStatus(c Code) int {
Expand Down

0 comments on commit a2f0543

Please sign in to comment.