Response is undefined in the case of an error.
Slight tweak.
Work in progress.