# mintFailureHttpStatus
Source: https://docs.maelstrom-ai.co/0.2/reference/realtime-openai-server/functions/mintfailurehttpstatus/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

> **mintFailureHttpStatus**(`reason`): `number`

Defined in: packages/realtime-protocol/dist/lib/mint.d.ts:58

Suggested HTTP status for a [MintFailureReason](https://docs.maelstrom-ai.co/0.2/reference/realtime-openai-server/type-aliases/mintfailurereason/), for callers wiring a minter into an HTTP transport. Minters stay transport-agnostic — nothing requires this mapping; a caller with different status-code conventions is free to write its own.

## Parameters

### reason

`"invalid-request"` | `"unsupported-provider"` | `"missing-api-key"` | `"invalid-config"` | `"upstream-failure"`

## Returns

`number`

## Example

```ts
return Response.json(
  { error: result.error.reason },
  { status: mintFailureHttpStatus(result.error.reason) },
);
```
