the generic catch block at the end of the get() method captures all errors and transforms them into a SerpApiError.requestFailed.
but, a CancellationError is the essential signal for a task to stop execution immediately. By catching and wrapping this specific error, it prevents the system from properly unwinding the task. This results in zombie tasks that continue to process data and mutate state even after the parent task has aborted the request.
the generic catch block at the end of the
get()method captures all errors and transforms them into aSerpApiError.requestFailed.but, a
CancellationErroris the essential signal for a task to stop execution immediately. By catching and wrapping this specific error, it prevents the system from properly unwinding the task. This results in zombie tasks that continue to process data and mutate state even after the parent task has aborted the request.