Closed brgv-code closed 1 month ago
Thank you for taking the time to submit your report! From the looks of it, this could be better discussed on our Discord. If you haven't already, please join here and send a new post in the # 🐈 nestjs-help forum. Make sure to include a link to this issue, so you don't need to write it all again. We have a large community of helpful members, who will assist you in getting this to work.
Is there an existing issue for this?
Current behavior
(Trying to get help from discord for over a week with no luck, hence posting it here)
I'm integrating two data sources in a search component; need to handle API failures by communicating errors to the frontend without crashing the app (using throw new Error crashes the app). Tried using interceptors and context for error handling without success; looking for advice.
Project has @nestjs/graphql for server-side and Apollo Client for client-side.
Data entity comprises of a union of two types, say foo and bar.
Minimum reproduction code
No url, but please refer to the module and service in the description
Steps to reproduce
No response
Expected behavior
I should be able to access the error object in @Context and be able to set custom error message, along with sending a partial data. I read through the docs and tried several approaches in vain.
Package version
12.0.11
Graphql version
graphql
: 16.8.1@nestjs/platform-express
: 10.3.0apollo-server-express
:apollo-server-fastify
:NestJS version
10.3.0
Node.js version
18.7.1
In which operating systems have you tested?
Other
No response