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:
parent
22ff34086d
commit
754b9ea872
5 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
1
packages/schemas/src/api/index.ts
Normal file
1
packages/schemas/src/api/index.ts
Normal file
|
@ -0,0 +1 @@
|
|||
export * from './error';
|
|
@ -1,2 +1,3 @@
|
|||
export * from './foundations';
|
||||
export * from './db-entries';
|
||||
export * from './api';
|
||||
|
|
Loading…
Add table
Reference in a new issue