Unfortunately, my internet connection froze up quite a bit and the screen share got mangled - it gets better after a while. I believe it's still worthwhile to watch and you all will enjoy it! :)
You both had such incredible stuff to share that even audio-only this was so worthwhile! We're really looking forward to doing more in the future with some of your other projects!
Unfortunately, my internet connection froze up quite a bit and the screen share got mangled - it gets better after a while. I believe it's still worthwhile to watch and you all will enjoy it! :)
You both had such incredible stuff to share that even audio-only this was so worthwhile! We're really looking forward to doing more in the future with some of your other projects!
i am very new to programming. I got stuck in handling responses. lemme share the code here.
from express:
const existingUser = await db.user.findUnique({ where: { email: email } });
if (existingUser)
return res
.status(409)
.send({ message: `User, ${username} already exists` });
how to extract this response and use it in my component?
const response = await addUser(formData);
console.log(response);
if ("data" in response) {
toast({
title: "Success",
description: `${response.data?.message}`,
});
} else {
toast({
title: "Error",
description: `${
"error" in response
? response.error?.data?.message
: "Something went wrong"
}`,
});
}
Property 'data' does not exist on type 'FetchBaseQueryError | SerializedError'.
Property 'data' does not exist on type 'SerializedError'.ts
it's a lot easier to have a conversation on discord: how about you bring this over there? (links are in the video description)