adds jest types
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const errorHandler = require('./errorHandler');
|
||||
const APIError = require('../../errors/APIError');
|
||||
import errorHandler from './errorHandler';
|
||||
import { APIError } from '../../errors';
|
||||
|
||||
const testError = new APIError('test error', 503);
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import httpStatus from 'http-status';
|
||||
import formatErrorResponse from '../responses/formatError';
|
||||
const logger = require('../../utilities/logger')();
|
||||
import logger from '../../utilities/logger';
|
||||
|
||||
logger();
|
||||
|
||||
const errorHandler = (config) => async (err, req, res, next) => {
|
||||
const data = formatErrorResponse(err);
|
||||
|
||||
Reference in New Issue
Block a user