If the operation is successful, the error number of 0 is appended to the error string, errno. If the operation is not successful, the errno variable contains the error: FAILED: DELETEEVENTS_BY_RANGE_FAILED (22).
See also, Error Handling