Uses JS Error object for error callback.