diff --git a/x-pack/plugins/infra/public/hooks/use_http_request.tsx b/x-pack/plugins/infra/public/hooks/use_http_request.tsx index 78ef96992399293..7e2b6f03ab91666 100644 --- a/x-pack/plugins/infra/public/hooks/use_http_request.tsx +++ b/x-pack/plugins/infra/public/hooks/use_http_request.tsx @@ -106,6 +106,7 @@ export function useHTTPRequest( onResolve: (resp) => { try { setResponse(decode(resp)); // Catch decoding errors + setError(null); } catch (e) { onError(e); }