Skip to content

Commit

Permalink
Merge branch 'main' into automatic_chromatic
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Dec 28, 2023
2 parents 353c334 + 2b547be commit c55d3e6
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,11 @@ export class GuidedSourceDataPage extends ManagedPage {
if (isStorybook) return;

if (result.message) {
const [
type,
text = `<small><pre>${result.traceback
.trim()
.split("\n")
.slice(-2)[0]
.trim()}</pre></small>`,
] = result.message.split(":");
const [type, ...splitText] = result.message.split(":");
const text = splitText.length
? splitText.join(":").replaceAll("<", "&lt").replaceAll(">", "&gt")
: `<small><pre>${result.traceback.trim().split("\n").slice(-2)[0].trim()}</pre></small>`;

const message = `<h4 style="margin: 0;">Request Failed</h4><small>${type}</small><p>${text}</p>`;
this.notify(message, "error");
throw result;
Expand Down

0 comments on commit c55d3e6

Please sign in to comment.