Added a context member to the error object.

- The context member is to provide additional information that can help identify the cause of an error.

#2469
Expanded on the response redirection facts to check that a context member is passed on the error object.

#2469
Addressed code review comments.

- Also added extra context to errors where it made sense.

#2469
Addressed code review comments.