Getting the CANCELLED error code out