MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / Message

Method Message

lib/workertypes/comparables/types.go:62–83  ·  view source on GitHub ↗

Message returns a user-friendly error message for the given code.

()

Source from the content-addressed store, hash-verified

60
61// Message returns a user-friendly error message for the given code.
62func (c QueryErrorCode) Message() string {
63 switch c {
64 case ErrorCodeSavedSearchNotFound:
65 return "Saved search not found."
66 case ErrorCodeHotlistNotFound:
67 return "Hotlist not found."
68 case ErrorCodeSavedSearchCycleDetected:
69 return "Saved search cycle detected."
70 case ErrorCodeSavedSearchMaxDepthExceeded:
71 return "Saved search max depth exceeded."
72 case ErrorCodeQueryGrammar:
73 return "The query contains grammar errors."
74 case ErrorCodeFeatureNotFound:
75 return "Feature not found."
76 case ErrorCodeInvalidQuery:
77 return "Invalid query."
78 case ErrorCodeUnknown:
79 fallthrough
80 default:
81 return "An unknown error occurred while processing the query."
82 }
83}
84
85type Feature struct {
86 ID string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected