Finished up with improvements to error handling.
This commit is contained in:
parent
a6228a9fd9
commit
23ceb74883
8 changed files with 128 additions and 40 deletions
|
|
@ -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:");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue