0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

refactor: move error types to schema bundle

move error types to schema bundle
This commit is contained in:
Simeng Li 2021-08-11 21:04:12 +08:00
parent 22ff34086d
commit 754b9ea872
5 changed files with 5 additions and 4 deletions

View file

@ -1,9 +1,7 @@
import pick from 'lodash.pick';
import i18next from 'i18next';
import { LogtoErrorCode } from '@logto/phrases';
import { RequestErrorBody, RequestErrorMetadata } from './types';
export * from './types';
import { RequestErrorBody, RequestErrorMetadata } from '@logto/schemas';
export default class RequestError extends Error {
code: LogtoErrorCode;

View file

@ -1,4 +1,5 @@
import RequestError, { RequestErrorBody } from '@/errors/RequestError';
import RequestError from '@/errors/RequestError';
import { RequestErrorBody } from '@logto/schemas';
import decamelize from 'decamelize';
import { Middleware } from 'koa';
import { errors } from 'oidc-provider';

View file

@ -0,0 +1 @@
export * from './error';

View file

@ -1,2 +1,3 @@
export * from './foundations';
export * from './db-entries';
export * from './api';