-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix(export): show 'Data export requires Business Plan' on 404 for SaaS #97546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
cfe9e2e
240d5d9
43aa5a2
fd2b236
01c0c79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -5,6 +5,7 @@ import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicato | |||
import Feature from 'sentry/components/acl/feature'; | ||||
import {Button} from 'sentry/components/core/button'; | ||||
import {t} from 'sentry/locale'; | ||||
import ConfigStore from 'sentry/stores/configStore'; | ||||
import useApi from 'sentry/utils/useApi'; | ||||
import useOrganization from 'sentry/utils/useOrganization'; | ||||
|
||||
|
@@ -70,11 +71,14 @@ export function useDataExport({ | |||
if (unmountedRef?.current) { | ||||
return; | ||||
} | ||||
const isSelfHosted = ConfigStore.get('isSelfHosted'); | ||||
const message = | ||||
err?.responseJSON?.detail ?? | ||||
t( | ||||
"We tried our hardest, but we couldn't export your data. Give it another go." | ||||
); | ||||
err?.status === 404 && !isSelfHosted | ||||
? t('Data export requires Business Plan') | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't the button be disabled or removed if they can't export on their plan There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there a feature flag? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah that is probably the better fix There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i just updated the branch. let me know if that makes sense. |
||||
: (err?.responseJSON?.detail ?? | ||||
t( | ||||
"We tried our hardest, but we couldn't export your data. Give it another go." | ||||
)); | ||||
|
||||
addErrorMessage(message); | ||||
inProgressCallback?.(false); | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
404 seems like the wrong status to return if they dont have the feature - is it worth following this pr up with an update in the backend?