Skip to content

Commit fc740db

Browse files
committed
Fix: improve error handling in fethTeamData
1 parent 8826dd1 commit fc740db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Components/forms/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ class Forms extends Component {
2828
teamData.sort((a, b) => a.name.localeCompare(b.name))
2929

3030
this.setState({ teamOptions: teamData })
31-
} catch (error) {
32-
console.error('Error fetching team data:', error)
31+
} catch (err) {
32+
return this.setState({
33+
err: 'Sorry, we are currently experiencing technical issues, please try again later.'
34+
})
3335
}
3436
}
3537

0 commit comments

Comments
 (0)