Skip to content
Snippets Groups Projects
Commit b1e9a6cc authored by lass's avatar lass
Browse files

Remove console output

parent c492e1b9
No related branches found
No related tags found
1 merge request!402Add check for if email exists in guest registration
Pipeline #188471 passed
...@@ -95,9 +95,8 @@ export default function StepRegistration() { ...@@ -95,9 +95,8 @@ export default function StepRegistration() {
errorBodyText: errorText, errorBodyText: errorText,
}) })
}) })
.catch((error) => { .catch(() => {
// Extracting data from body failed, just show an error message with no body text // Extracting data from body failed, just show an error message with no body text
console.error('error', error)
setSubmitErrorReport({ setSubmitErrorReport({
errorHeading: t('error.invitationCreationFailedHeader'), errorHeading: t('error.invitationCreationFailedHeader'),
statusCode: res.status, statusCode: res.status,
...@@ -114,7 +113,6 @@ export default function StepRegistration() { ...@@ -114,7 +113,6 @@ export default function StepRegistration() {
.json() .json()
.then((jsonResponse) => { .then((jsonResponse) => {
// If there is a body then it should have some json-content // If there is a body then it should have some json-content
console.log('result', jsonResponse)
if ('code' in jsonResponse) { if ('code' in jsonResponse) {
// There is something in the body indicating a warning // There is something in the body indicating a warning
...@@ -124,14 +122,8 @@ export default function StepRegistration() { ...@@ -124,14 +122,8 @@ export default function StepRegistration() {
statusText: undefined, statusText: undefined,
errorBodyText: t(`error.codes.${jsonResponse.code}`), 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(() => { .finally(() => {
setSubmitState(SubmitState.SubmitSuccess) setSubmitState(SubmitState.SubmitSuccess)
setActiveStep(Steps.SuccessStep) setActiveStep(Steps.SuccessStep)
...@@ -159,7 +151,6 @@ export default function StepRegistration() { ...@@ -159,7 +151,6 @@ export default function StepRegistration() {
}, },
} }
console.log('submitting', JSON.stringify(payload))
fetch('/api/ui/v1/invite/', submitJsonOpts('POST', payload)) fetch('/api/ui/v1/invite/', submitJsonOpts('POST', payload))
.then((res) => { .then((res) => {
if (!res.ok) { if (!res.ok) {
...@@ -169,8 +160,7 @@ export default function StepRegistration() { ...@@ -169,8 +160,7 @@ export default function StepRegistration() {
} }
return null return null
}) })
.catch((error) => { .catch(() => {
console.error('error', error)
setSubmitState(SubmitState.SubmitFailure) setSubmitState(SubmitState.SubmitFailure)
}) })
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment