useProvisionedRequestHandler: reset ref when a new request is loading (#113196)

This commit is contained in:
Yunwen Zheng
2025-10-30 10:37:13 -04:00
committed by GitHub
parent 1342858f36
commit 20ec8ee61c
@@ -90,6 +90,11 @@ export function useProvisionedRequestHandler<T>({
workflow,
};
// Reset handler guard when a new request starts loading
if (request.isLoading) {
hasHandled.current = false;
}
if (request.isError) {
hasHandled.current = true;
handlers.onError?.(request.error, info);