Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Inferring the right error on contextSwapperMiddleware #1

Closed
KATT opened this issue Jan 18, 2022 · 0 comments · Fixed by #2
Closed

Inferring the right error on contextSwapperMiddleware #1

KATT opened this issue Jan 18, 2022 · 0 comments · Fixed by #2
Labels
bug Something isn't working

Comments

@KATT
Copy link
Member

KATT commented Jan 18, 2022

Steps to reproduce

  1. Comment out https://github.com/KATT/trpc-procedure-play/blob/b9ea789c7c34e3ca12dea432856158d2c7753873/src/server.ts#L69-L85
  2. Re-enable https://github.com/KATT/trpc-procedure-play/blob/b9ea789c7c34e3ca12dea432856158d2c7753873/src/server.ts#L68

Expected

result at https://github.com/KATT/trpc-procedure-play/blob/b9ea789c7c34e3ca12dea432856158d2c7753873/src/server.ts#L107 should return the UNAUTHORIZED as part of the errors

Actual

result is ResultError | [...]

@KATT KATT added the bug Something isn't working label Jan 18, 2022
@KATT KATT mentioned this issue Jan 18, 2022
@KATT KATT closed this as completed in #2 Jan 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant