Add the err object to certain callbacks