Skip to content
tRPC

Partners

Function: getHTTPStatusCode()

On this page

getHTTPStatusCode(json, errors?): number

Defined in: packages/server/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts:76

The HTTP status for a response, or for a batch of them: 207 when the responses' statuses differ.

Parameters

ParameterType
jsonTRPCResponse | TRPCResponse[]
errors?readonly (undefined | TRPCError)[]

Returns

number

See

https://trpc.io/docs/rpc#error-codes---http-status