How to use the italia-ts-commons/lib/responses.ResponseErrorGeneric function in italia-ts-commons

To help you get started, we’ve selected a few italia-ts-commons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github teamdigitale / io-functions / lib / utils / response.ts View on Github external
export function ResponseErrorQuery(
  detail: string,
  error: DocumentDb.QueryError
): IResponseErrorQuery {
  return {
    ...ResponseErrorGeneric(
      HttpStatusCodeEnum.HTTP_STATUS_500,
      `Query error (${error.code})`,
      detail
    ),
    kind: "IResponseErrorQuery"
  };
}