Skip to content

Check for message in error reducer

Alf Eaton requested to merge error-reducer into master

The error reducer takes every action with an error property and stores the value of error.message.

If an action has an error property that isn't an error object (e.g. true), then the reducer was returning undefined, which causes an error.

With this change, the reducer now checks for the presence of error.message.

It also now outputs the error using console.error instead of console.log.

Merge request reports