Using JS Error object for error callback.