console: improve error handling for prerelease notification opt-out (#4983)

This commit is contained in:
Sameer Kolhar 2020-06-05 15:38:01 +05:30 committed by GitHub
parent aaab6d3eb6
commit e4e4856085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -29,6 +29,16 @@ const setConsoleOptsInDB = (opts, successCb, errorCb) => (
...opts,
};
if (!hasura_uuid) {
dispatch(
showErrorNotification(
'Opt out of pre-release notifications failed',
'Internal error: missing hasura_uuid'
)
);
return;
}
const options = {
credentials: globalCookiePolicy,
method: 'POST',