Skip to content

Commit

Permalink
Try to display more details of job creation errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Jan 25, 2024
1 parent 095edba commit 86f09b4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/datastore.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,15 @@ async function createJob(collabId, jobData, auth) {
cache.jobs[collabId][createdJob.id] = createdJob;
return "success";
} else {
throw new Error("job creation was not successful");
let errorDetails = "";
try {
const errors = await response.json();
errorDetails = errors.detail;
} catch (err) {
console.log("Unable to get error details");
console.log(err);
}
throw new Error("Job creation was not successful. " + errorDetails);
}
}

Expand Down

0 comments on commit 86f09b4

Please sign in to comment.