diff --git a/frontend/src/routes/sponsor/register/stepRegistration.tsx b/frontend/src/routes/sponsor/register/stepRegistration.tsx index 4fe22457a609006d39f6e8c757d8f4d985c5d3b4..1d3c72b0ff1d58d68b7cf4806fe7b50a41cb1c78 100644 --- a/frontend/src/routes/sponsor/register/stepRegistration.tsx +++ b/frontend/src/routes/sponsor/register/stepRegistration.tsx @@ -95,9 +95,8 @@ export default function StepRegistration() { errorBodyText: errorText, }) }) - .catch((error) => { + .catch(() => { // Extracting data from body failed, just show an error message with no body text - console.error('error', error) setSubmitErrorReport({ errorHeading: t('error.invitationCreationFailedHeader'), statusCode: res.status, @@ -114,7 +113,6 @@ export default function StepRegistration() { .json() .then((jsonResponse) => { // If there is a body then it should have some json-content - console.log('result', jsonResponse) if ('code' in jsonResponse) { // There is something in the body indicating a warning @@ -124,14 +122,8 @@ export default function StepRegistration() { statusText: undefined, errorBodyText: t(`error.codes.${jsonResponse.code}`), }) - } else { - console.log(JSON.stringify(jsonResponse)) } }) - .catch((exception) => { - // There was a problem when extracting the body - console.error(exception) - }) .finally(() => { setSubmitState(SubmitState.SubmitSuccess) setActiveStep(Steps.SuccessStep) @@ -159,7 +151,6 @@ export default function StepRegistration() { }, } - console.log('submitting', JSON.stringify(payload)) fetch('/api/ui/v1/invite/', submitJsonOpts('POST', payload)) .then((res) => { if (!res.ok) { @@ -169,8 +160,7 @@ export default function StepRegistration() { } return null }) - .catch((error) => { - console.error('error', error) + .catch(() => { setSubmitState(SubmitState.SubmitFailure) }) }