After successful login, I expect a certain variable to be updated with the appropriate value. However, during testing, all I see is 'undefined' returned.
This variable does change when interacting with the app, showing an error message like 'Either username or password were incorrect' when logging in with wrong credentials.
Why am I unable to observe the changes in the errorMessage variable?
UPDATE: Upon further investigation by adding console.log messages at various points in the code, it seems that the issue lies in the const body within the auth > login() file, which should be returning a value but isn't.