return no content with status code 204 #182

Closed
opened 2026-04-05 20:35:33 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @stefan0xC on 1/5/2026

As discussed in https://github.com/dani-garcia/vaultwarden/issues/6592#issuecomment-3709484614 the Bitwarden android app expects the status code to be 204 No Content for this endpoint if the response is empty. (Cf. AccountsController.cs#L124). With the default 200 it tries to convert it to JSON which fails. kotlinx.serialization.json.internal.JsonDecodingException: Cannot read Json element because of unexpected end of the input at path: $

(To test you need to configure both mail and set SIGNUPS_VERIFY=true otherwise you can just choose a password.)

*Originally created by @stefan0xC on 1/5/2026* As discussed in https://github.com/dani-garcia/vaultwarden/issues/6592#issuecomment-3709484614 the Bitwarden android app expects the status code to be `204 No Content` for this endpoint if the response is empty. (Cf. [AccountsController.cs#L124](https://github.com/bitwarden/server/blob/68702611916668660521c9657ad5b317fd9ebca4/src/Identity/Controllers/AccountsController.cs#L124)). With the default `200` it tries to convert it to JSON which fails. ```kotlinx.serialization.json.internal.JsonDecodingException: Cannot read Json element because of unexpected end of the input at path: $``` (To test you need to configure both mail and set `SIGNUPS_VERIFY=true` otherwise you can just choose a password.)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#182