Finished up with improvements to error handling.

This commit is contained in:
rainbow napkin 2025-04-29 07:05:38 -04:00
parent a6228a9fd9
commit 23ceb74883
8 changed files with 128 additions and 40 deletions

View file

@ -105,7 +105,11 @@ class canopyUXUtils{
try{
const errors = body.errors;
errors.forEach((err)=>{
new canopyUXUtils.popup(`<h3>${err.type} Error:</h3><p><br>${err.msg}</p>`);
//Capitalize the first letter of the type
const type = `${err.type[0].toUpperCase()}${err.type.slice(1)}`
//Display our error
new canopyUXUtils.popup(`<h3>${type} Error:</h3><p><br>${err.msg}</p>`);
});
}catch(err){
console.error("Display Error Body:");