Skip to content

Commit

Permalink
display report creation error (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
nichelle-hall authored Nov 17, 2022
1 parent 000fe2a commit 934c3b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions publisher/src/components/Reports/CreateReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,12 @@ const CreateReport = () => {
trackReportCreated(report.id, agency);
return;
}
if (response.status === 400) {
const responseJson = await response.json();
const responseJson = await response.json();
if (
responseJson.description.includes(
"A report of that date range has already been created."
)
) {
showToast(responseJson.description, false, "red");
return;
}
Expand Down

0 comments on commit 934c3b2

Please sign in to comment.