Skip to content

Zainab's PR#149

Open
zainabch123 wants to merge 12 commits intoboolean-uk:mainfrom
zainabch123:main
Open

Zainab's PR#149
zainabch123 wants to merge 12 commits intoboolean-uk:mainfrom
zainabch123:main

Conversation

@zainabch123
Copy link

No description provided.

Copy link
Contributor

@dogezen dogezen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work so far


res.status(201).json({ customer: updatedCustomer });
} catch (err) {
console.log("Error:", err);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to send back a response with a specific error:

res.status(400).json({error: "missing name or contact"})

});
}
}
res.status(500).json({ error: err.message });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we'd typically send back just a 400 - bad request? but 500 is ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants