Bugs
Bugs
Bugs
connection file
means we didnt use await in our controller so the router goes and goes without waiting the query
- findbyidandupdate doesnt accept to return the result of that query cuz thats mean return the old data
before it was changed although we can do it by other queries, but we can do it here by adding
{new:true} to the query and means return the new value after update
- MissingSchemaError: Schema hasn't been registered for model : means the we used populate, so we
edited the refrence of our "forExample" notes table to users table at the notes.model.js----- BUT WE
DIDNT ADD S IN THE USER TABLE "USER"
- Error: data and salt arguments required : means there is something with the hash variables, mostly
there is something from the postman or the front end
- err = new Error(message); Error: No recipients defined :- This kind of error occurs when value
assigned to key to in object given to sendMail method is empty or not string. As we see it means that
something wrong happens and you don't get the same data on the server-side, as you sent in client.
- Cannot set headers after they are sent to the client : means there is something with your parameters
like not sending two arguments although your function has three params
- if youre having html file as response, look if you sent a response or did next() ?
OR
you uploaded more than single file but you used single object that are assosiated with single file only
- This is uncaughtException tell your there is a problem: TypeError: storage._handleFile is not a function
means look at the storage handler function or object, i sent here object to another object, they both do
the same thing, so compiler her got confused, why you mentioned that object while you have an object
do the same jops???
storage: diskStorage,
fileFilter,
});
- failed custom validation because Cannot read properties of undefined (reading 'presence'): means you
used required only without paranthese in the validation schema
- Error: data and salt arguments required at Object.hashSync :::: means look at your argumnets cuz they
maybe empty