Skip to content

CustomEmojiProblem

The problem of a custom emoji that breaks a rule (422, /api/v1/problems/invalid-custom-emoji); reason says which. Another 422 (a malformed request) has none.

object
type
required

A URI that identifies the problem type, stable for clients to branch on. It is about:blank when the problem means no more than its HTTP status.

string format: uri-reference
title
required

A short summary of the problem type, localized from Accept-Language.

string
status
required

The HTTP status code.

integer
>= 400 <= 599
detail

An explanation of this occurrence, localized from Accept-Language.

string
request_id

The request ID (the X-Request-Id response header), for reporting the problem.

string
field

The member of the request that a 422 is about, by its name in the request: a property of the JSON body by its path (display_name, fields[].name, poll.options[1]), a form field, a query parameter, or a header (Idempotency-Key). detail then says what is wrong with its value without naming it, for the client to show beside that field. Absent when the problem is not about one member.

string
reason

Why a custom emoji is refused. invalid_shortcode: not 2 to 30 letters, digits, and underscores. shortcode_taken: a local emoji has the shortcode, or a pending request reserves it. invalid_alias: an alias breaks the rules of a shortcode, or there are more than 10. invalid_category: the category is longer than 64 characters or not text. media_not_found: the media file is not an upload of the user. media_not_ready: it has not finished processing. unsupported_format: it is not a PNG, a GIF, or a WebP. too_large: it is larger than custom_emoji_max_bytes. too_big: it is larger than 1,024 pixels on a side. remote_emoji: the operation is for local emoji only. local_emoji: the operation is for remote emoji only. fetch_failed: the image of the remote emoji could not be fetched (its server did not return it, or the instance rejects the media of its domain). limit_reached: the approved and pending requests to create an emoji that the user submitted this month (UTC) are as many as their monthly limit. request_pending: the emoji already has a pending request for a new image. invalid_reason: the reason of a rejection is longer than 500 characters or not text.

string
Allowed values: invalid_shortcode shortcode_taken invalid_alias invalid_category media_not_found media_not_ready unsupported_format too_large too_big remote_emoji local_emoji fetch_failed limit_reached request_pending invalid_reason

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"request_id": "example",
"field": "example",
"reason": "invalid_shortcode"
}

For LLMs and coding agents:llms.txt,llms-full.txt, llms-small.txt

Analytics on this site