Skip to content

Commit

Permalink
Fix error parsing for project provider
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg committed Jun 5, 2024
1 parent e5036f3 commit 4bb5de4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/common/providers/ProjectProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const ProjectProvider = class extends React.Component {
this.setState(
Object.assign(
{
error: ProjectStore.error,
isLoading: ProjectStore.isLoading,
isSaving: ProjectStore.isSaving,
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/web/components/ErrorMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class ErrorMessage extends PureComponent {
const errorMessageClassName = `alert alert-danger ${
this.props.errorMessageClass || 'flex-1 align-items-center'
}`
const error = this.props.error?.data || this.props.error
const error = this.props.error?.data || this.props.error?.message || this.props.error
return this.props.error ? (
<div
className={errorMessageClassName}
Expand Down
6 changes: 5 additions & 1 deletion frontend/web/components/pages/CreateEnvironmentPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,13 @@ const CreateEnvironmentPage = class extends Component {
/>
)}
</CondensedRow>
{error && (
<CondensedRow>
<ErrorMessage error={error} />
</CondensedRow>
)}
</div>

{error && <ErrorMessage error={error} />}
<CondensedRow>
<div className='text-right'>
{permission ? (
Expand Down

0 comments on commit 4bb5de4

Please sign in to comment.