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 c362fa61cf
commit b4a6c62e15
8 changed files with 7 additions and 19 deletions

View File

@ -1,12 +0,0 @@
/**
* Re-export from @bytelyst/errors shared across all services.
*/
export {
ServiceError,
BadRequestError,
UnauthorizedError,
ForbiddenError,
NotFoundError,
ConflictError,
TooManyRequestsError,
} from '@bytelyst/errors';

View File

@ -3,7 +3,7 @@
*/
import type { FastifyRequest } from 'fastify';
import { BadRequestError } from './errors.js';
import { BadRequestError } from '@bytelyst/errors';
export interface JwtPayload {
sub: string;

View File

@ -14,7 +14,7 @@
import crypto from 'node:crypto';
import type { FastifyInstance } from 'fastify';
import { BadRequestError, NotFoundError, ForbiddenError, ConflictError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError, ForbiddenError, ConflictError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import * as repo from './repository.js';
import {

View File

@ -11,7 +11,7 @@
*/
import type { FastifyInstance } from 'fastify';
import { BadRequestError, NotFoundError, ConflictError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError, ConflictError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import * as repo from './repository.js';
import {

View File

@ -13,7 +13,7 @@
import crypto from 'node:crypto';
import type { FastifyInstance } from 'fastify';
import { BadRequestError, NotFoundError, ForbiddenError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError, ForbiddenError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import { getHousehold } from '../households/repository.js';
import * as repo from './repository.js';

View File

@ -11,7 +11,7 @@
*/
import type { FastifyInstance } from 'fastify';
import { BadRequestError, NotFoundError, ConflictError } from '../../lib/errors.js';
import { BadRequestError, NotFoundError, ConflictError } from '@bytelyst/errors';
import { extractAuth } from '../../lib/auth.js';
import * as repo from './repository.js';
import {

View File

@ -1,5 +1,5 @@
import { getCollection } from '../../lib/datastore.js';
import { NotFoundError, ConflictError } from '../../lib/errors.js';
import { NotFoundError, ConflictError } from '@bytelyst/errors';
import type {
WebhookSubscriptionDoc,
WebhookEventDoc,

View File

@ -8,7 +8,7 @@ import {
import * as repo from './repository.js';
import { dispatchEvent } from './dispatcher.js';
import { extractAuth } from '../../lib/auth.js';
import { BadRequestError } from '../../lib/errors.js';
import { BadRequestError } from '@bytelyst/errors';
const PRODUCT_ID = 'chronomind';