Skip to content

@OnUndefined NotFoundError Generics #473

@lixaotec

Description

@lixaotec

Der fellows,

This might be just a question as I do not master Typescript language.

How could I use a generic 'EntityNotFoundError' with @OnUndefined decorator?

That would avoid a lot of boiler entities repeatable error like
UserNotFoundError
PetNotFoundError...

I wish to acomplish a EntityNotFoundError that could by reflection or parameters retirn the custom message

@OnUndefined(EntityNotFoundError) # this doesnt work

@OnUndefined(EntityNotFoundError('User')) # That do not work either.

How should I come with that?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: awaiting answerAwaiting answer from the author of issue or PR.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions