web: throw error on failure status #16

Merged
Quaternions merged 3 commits from error into staging 2025-03-24 23:03:53 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 298f3d9b8e - Show all commits
web/src/app
submissions/[submissionId]
submit

@ -25,7 +25,7 @@ async function ReviewButtonClicked(action: Action, submissionId: string) {
});
// Check if the HTTP request was successful
if (!response.ok) {
let errorDetails = await response.text();
const errorDetails = await response.text();
// Throw an error with detailed information
throw new Error(`HTTP error! status: ${response.status}, details: ${errorDetails}`);

@ -53,7 +53,7 @@ export default function SubmissionInfoPage() {
// Check if the HTTP request was successful
if (!response.ok) {
let errorDetails = await response.text();
const errorDetails = await response.text();
// Throw an error with detailed information
throw new Error(`HTTP error! status: ${response.status}, details: ${errorDetails}`);