teableio/teable

View on GitHub
apps/nestjs-backend/test/utils/get-error.ts

Summary

Maintainability
A
0 mins
Test Coverage
import type { HttpError } from '@teable/core';

export const getError = async (call: () => unknown) => {
  try {
    await call();
    return;
  } catch (error: unknown) {
    return error as HttpError;
  }
};