Skip to content

Commit

Permalink
Handle error when user needs to upgrade for private app (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
hdoupe committed Nov 3, 2021
1 parent 51c4667 commit 050a360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Publish/components/ProjectApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class ProjectApp extends React.Component<
console.log(error.response.data);
actions.setSubmitting(false);
if (error.response.status == 400) {
actions.setStatus(error.response.data);
actions.setStatus({ private_app: error.response.data?.app});
} else if (error.response.status == 401) {
actions.setStatus({
auth: "You must be logged in to publish an app.",
Expand Down Expand Up @@ -112,9 +112,9 @@ class ProjectApp extends React.Component<
message="You must be logged in to create or update an app."
/>
)}
{props.status?.collaborators && (
{props.status?.private_app && (
<PrivateAppException
upgradeTo={(props.status.collaborators as ResourceLimitException).upgrade_to}
upgradeTo={(props.status.private_app as ResourceLimitException).upgrade_to}
/>
)}
{project?.status === "running" || project?.status === "staging" ? (
Expand Down

0 comments on commit 050a360

Please sign in to comment.