refactor(backend): remove errors.ts re-export, import @bytelyst/errors directly
This commit is contained in:
parent
c362fa61cf
commit
b4a6c62e15
@ -1,12 +0,0 @@
|
|||||||
/**
|
|
||||||
* Re-export from @bytelyst/errors — shared across all services.
|
|
||||||
*/
|
|
||||||
export {
|
|
||||||
ServiceError,
|
|
||||||
BadRequestError,
|
|
||||||
UnauthorizedError,
|
|
||||||
ForbiddenError,
|
|
||||||
NotFoundError,
|
|
||||||
ConflictError,
|
|
||||||
TooManyRequestsError,
|
|
||||||
} from '@bytelyst/errors';
|
|
||||||
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { FastifyRequest } from 'fastify';
|
import type { FastifyRequest } from 'fastify';
|
||||||
import { BadRequestError } from './errors.js';
|
import { BadRequestError } from '@bytelyst/errors';
|
||||||
|
|
||||||
export interface JwtPayload {
|
export interface JwtPayload {
|
||||||
sub: string;
|
sub: string;
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import crypto from 'node:crypto';
|
import crypto from 'node:crypto';
|
||||||
import type { FastifyInstance } from 'fastify';
|
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 { extractAuth } from '../../lib/auth.js';
|
||||||
import * as repo from './repository.js';
|
import * as repo from './repository.js';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { FastifyInstance } from 'fastify';
|
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 { extractAuth } from '../../lib/auth.js';
|
||||||
import * as repo from './repository.js';
|
import * as repo from './repository.js';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
import crypto from 'node:crypto';
|
import crypto from 'node:crypto';
|
||||||
import type { FastifyInstance } from 'fastify';
|
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 { extractAuth } from '../../lib/auth.js';
|
||||||
import { getHousehold } from '../households/repository.js';
|
import { getHousehold } from '../households/repository.js';
|
||||||
import * as repo from './repository.js';
|
import * as repo from './repository.js';
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { FastifyInstance } from 'fastify';
|
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 { extractAuth } from '../../lib/auth.js';
|
||||||
import * as repo from './repository.js';
|
import * as repo from './repository.js';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { getCollection } from '../../lib/datastore.js';
|
import { getCollection } from '../../lib/datastore.js';
|
||||||
import { NotFoundError, ConflictError } from '../../lib/errors.js';
|
import { NotFoundError, ConflictError } from '@bytelyst/errors';
|
||||||
import type {
|
import type {
|
||||||
WebhookSubscriptionDoc,
|
WebhookSubscriptionDoc,
|
||||||
WebhookEventDoc,
|
WebhookEventDoc,
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import {
|
|||||||
import * as repo from './repository.js';
|
import * as repo from './repository.js';
|
||||||
import { dispatchEvent } from './dispatcher.js';
|
import { dispatchEvent } from './dispatcher.js';
|
||||||
import { extractAuth } from '../../lib/auth.js';
|
import { extractAuth } from '../../lib/auth.js';
|
||||||
import { BadRequestError } from '../../lib/errors.js';
|
import { BadRequestError } from '@bytelyst/errors';
|
||||||
|
|
||||||
const PRODUCT_ID = 'chronomind';
|
const PRODUCT_ID = 'chronomind';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user