Skip to content

API endpoint error returns error text with bad content type #4973

@sysadmind

Description

@sysadmind

What did you do?

While trying to build the API client for the new Mantine UI, I started getting error responses from the API with an incorrect content type. The errors come back as raw text, but the content-type header is set to application/json.

I tried to dig in, but most of the code is generated and it's hard to follow.

What did you expect to see?

I expected to see either a plain text content-type OR a JSON response body with some sort of error key.

What did you see instead? Under which circumstances?

When trying to get the alert group endpoint to work with filters, I created the incorrect URL /api/v2/alerts/groups?silenced=false&inhibited=false&filter=a%3D%22b%22&c%3D%22d%22 and this produces a response "bad matcher format: a%3D%22b%22&c%3D%22d%22", but again, the content-type header is application/json.

System information

No response

Alertmanager version

alertmanager, version  (branch: main , revision: unknown)
  build user:       
  build date:       
  go version:       go1.25.6
  platform:         linux/amd64
  tags:             unknown

Alertmanager configuration file

Prometheus version


Prometheus configuration file

Logs


Metadata

Metadata

Assignees

Type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions