GraphReFlyTS

API Reference

lowerProtocolError()

Lowers protocol error.

Import

import { lowerProtocolError } from "@graphrefly/ts/adapters/nestjs";

Signature

function lowerProtocolError(
	errorPayload: unknown,
	host: THost,
	opts: { readonly protocolError?: NestProtocolErrorResponse<THost> } = {},
): NestHttpResponsePayload

Parameters

ParameterTypeDescription
errorPayloadunknownProtocol error payload to lower into a response.
hostTHostHost object from the framework boundary.
opts{ readonly protocolError?: NestProtocolErrorResponse<THost> }Options that configure the helper.

Returns

The lower protocol error result.

Example

import { lowerProtocolError } from "@graphrefly/ts/adapters/nestjs";

Source

packages/ts/src/adapters/nestjs.ts