Skip to content

Commit 5ed5862

Browse files
committed
check that an error exists before trying to configure it
1 parent 49f5df3 commit 5ed5862

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/api/configurations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const configureRequests = ({ data, path }) => {
6969
export const configureErrors = (errors) => {
7070
const env = process.env.NODE_ENV
7171
const remainingErrors = errors
72-
.filter(error => Object.keys(error).length)
72+
.filter(error => error && Object.keys(error).length)
7373
.map(error => ({
7474
...error,
7575
message: `${error.message} (${error.response?.data?.message})`,

0 commit comments

Comments
 (0)