import type { MongoDBError as IMongoDBError } from './types' export default class MongoDBError extends Error implements IMongoDBError { details: string hint: string code: string constructor(context: IMongoDBError) { super(context.message) this.name = 'MongoDBError' this.details = context.details this.hint = context.hint this.code = context.code } }