Invalid preference
type | https://docs.frem.sh/reference/api/errors/invalid-preference |
| HTTP status | 400 Bad Request |
What it means
The preference value in the request body is not one of the accepted values.
These are Forgejo-native notification settings, so the accepted set is fixed and matches Forgejo’s own vocabulary exactly:
| Value | Effect |
|---|---|
enabled | Receive all notification mail (Forgejo’s default). |
onmention | Receive mail only when explicitly mentioned. |
andyourown | Receive mail for your own actions as well. |
disabled | Receive no notification mail. |
Matching is case-sensitive: onmention is valid, onMention and ONMENTION
are not.
What to do
Send one of the four values above, spelled in lower case.
curl -X PATCH \
-H "Authorization: Bearer $FREMFORGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"preference":"onmention"}' \
https://frem.sh/_app/api/v1/orgs/<org>/members/<login>/forgejo-mailResponse shape
All fremforge API errors are RFC 9457 problem+json:
{
"type": "https://docs.frem.sh/reference/api/errors/invalid-preference",
"title": "Bad Request",
"status": 400,
"detail": "preference must be one of: enabled, onmention, andyourown, disabled."
}Branch on type, not on title or detail - those are human-readable and may be reworded.