How to handle errors with Prisma and Apollo? I'm r...
# prisma-whats-new
e
How to handle errors with Prisma and Apollo? I'm receiving
Network error: Response not successful: Received status code 400
and can't figure out how to get the error from the response.
e
It is already set to true. In fact, I'm getting the error correctly as a response. The problem is that Apollo only shows me "status code 400". To get a better idea, this is my code:
Copy code
try {
	const { sectionId, createPost } = this.props;

	const res = await createPost({
		variables: {
			sectionId
		}
	});
} catch (e) {
	console.log(e); // it logs "Response not successful: Received status code 400" instead of the error response {error: "some error from the server"}
}
n
please describe your situation in a new question in the forum: https://www.graph.cool/forum/c/questions 🙂
👍 1