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() {
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)
})
}
......
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