wtfutil/wtf · error
you specified wrong region. Possible options are only 'us' a
Error message
you specified wrong region. Possible options are only 'us' and 'eu'
What it means
Raised in the OpsGenie widget's Fetch when the configured region is not a key in opsGenieAPIUrl — i.e. settings.region is anything other than 'us' or 'eu'. Without a valid region the widget cannot build the API base URL, so fetching on-call schedules aborts. Note the message is returned when the map lookup succeeds is false, meaning region was misspelled or empty.
Source
Thrown at modules/opsgenie/client.go:48
}
/* -------------------- Exported Functions -------------------- */
func (widget *Widget) Fetch(scheduleIdentifierType string, schedules []string) ([]*OnCallResponse, error) {
agregatedResponses := []*OnCallResponse{}
if regionURL, regionErr := opsGenieAPIUrl[widget.settings.region]; regionErr {
for _, sched := range schedules {
scheduleURL := fmt.Sprintf("%s/v2/schedules/%s/on-calls?scheduleIdentifierType=%s&flat=true", regionURL, sched, scheduleIdentifierType)
response, err := opsGenieRequest(scheduleURL, widget.settings.apiKey)
agregatedResponses = append(agregatedResponses, response)
if err != nil {
return nil, err
}
}
return agregatedResponses, nil
} else {
return nil, fmt.Errorf("you specified wrong region. Possible options are only 'us' and 'eu'")
}
}
/* -------------------- Unexported Functions -------------------- */
func opsGenieRequest(url string, apiKey string) (*OnCallResponse, error) {
req, err := http.NewRequest("GET", url, http.NoBody)
if err != nil {
return nil, err
}
req.Header.Set("Authorization", fmt.Sprintf("GenieKey %s", apiKey))
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return nil, errView on GitHub (pinned to bb838c1ccb)
Solutions
- Set region in the OpsGenie widget config to exactly 'us' or 'eu'
- Check for typos, capitalization, or whitespace in the region value
- If region is omitted in config, add it explicitly rather than relying on defaults
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/opsgenie/client.go:48 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of wtfutil/wtf@bb838c1ccb (2026-09-03).
Data as JSON: /api/errors/d04e29dcf32a0ed1.
Report an issue: GitHub.