skip to Main Content

Javascript – Error on UnprocessableEntityException in Nest.js

Im fairly new to nest.js and following along a tutorial which you can see here: https://www.freecodecamp.org/news/build-web-apis-with-nestjs-beginners-guide/ So Im building the validate.pipe.ts and Im getting an error on the following code. import { Injectable, ArgumentMetadata, BadRequestException, ValidationPipe, UnprocessableEntityException } from '@nestjs/common';…

VIEW QUESTION

Reactjs – Frontend React unable to call API due to blocked CORS

Profile.jsx const res = await fetch(`http://localhost:5000/api/user/update/${currentUser._id}`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(formData) }) Error Access to fetch at 'http://localhost:5000/api/user/update/651cce95aa88ef0726740018' from origin 'http://localhost:5173' has been blocked by CORS policy: Response to preflight request doesn't pass access control…

VIEW QUESTION
Back To Top
Search