Adapted error message to work in context of callback.