Skip to content

How to response to non-processable tRPC requests #9

@smolak

Description

@smolak

Scenario:
I want to like the userUrl entry. I check if the entry exists. It does not.

  1. Do I respond with status: 'notFound' (or alike)?
  2. Do I throw TRPCError with BAD_REQUEST code?

First one requires if check in the response.
2nd one can be caught using onError handler (need to try it, haven't used it like that).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions