refactor(backend): remove errors.ts re-export, import @bytelyst/errors directly

This commit is contained in:
saravanakumardb1 2026-03-20 07:19:29 -07:00
parent 6babe05560
commit 2a32a54ae7
9 changed files with 8 additions and 17 deletions

View File

@ -1,9 +0,0 @@
export {
ServiceError,
BadRequestError,
UnauthorizedError,
ForbiddenError,
NotFoundError,
ConflictError,
TooManyRequestsError,
} from '@bytelyst/errors';

View File

@ -1,5 +1,5 @@
import type { FastifyRequest } from 'fastify';
import { BadRequestError } from './errors.js';
import { BadRequestError } from '@bytelyst/errors';
import { PRODUCT_ID } from './product-config.js';
export interface JwtPayload {

View File

@ -1,5 +1,5 @@
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
import { BadRequestError, NotFoundError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import { PRODUCT_ID } from '../../lib/product-config.js';
import * as repo from './repository.js';

View File

@ -1,5 +1,5 @@
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
import { BadRequestError, NotFoundError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import { PRODUCT_ID } from '../../lib/product-config.js';
import * as repo from './repository.js';

View File

@ -1,5 +1,5 @@
import type { FastifyInstance } from 'fastify';
import { BadRequestError } from '../../lib/errors.js';
import { BadRequestError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import { PRODUCT_ID } from '../../lib/product-config.js';
import * as repo from './repository.js';

View File

@ -1,5 +1,5 @@
import type { FastifyApp } from '@bytelyst/fastify-core';
import { BadRequestError, NotFoundError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import { PRODUCT_ID } from '../../lib/product-config.js';
import * as repo from './repository.js';

View File

@ -1,5 +1,5 @@
import type { FastifyApp } from '@bytelyst/fastify-core';
import { BadRequestError, NotFoundError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import { PRODUCT_ID } from '../../lib/product-config.js';
import { extractFromText } from '../../lib/extraction-client.js';

View File

@ -1,5 +1,5 @@
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
import { BadRequestError, NotFoundError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import { PRODUCT_ID } from '../../lib/product-config.js';
import * as repo from './repository.js';

View File

@ -1,5 +1,5 @@
import type { FastifyInstance } from 'fastify';
import { BadRequestError, NotFoundError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import { PRODUCT_ID } from '../../lib/product-config.js';
import * as repo from './repository.js';