The problem
We are uploading snapshots via a manual POST /percy/snapshot API request, within a percy exec invocation.
Sometimes, there is an error during asset discovery, and we see the following log lines:
2024-07-04 10:04:12 AEST [percy] asset-discovery - [snapshot name] - 30.013s
2024-07-04 10:04:12 AEST [percy] Encountered an error taking snapshot: [snapshot name]
2024-07-04 10:04:12 AEST [percy] Error: Navigation failed: Timed out waiting for the page load event
However, the POST /percy/snapshot request returns a 200 OK response, with {"success": true} in the body. Therefore our build succeeds, even though the snapshot failed, and there is no way for us to detect the problem.
I would expect a 500 Internal Server Error response in this situation, and possibly some details in the response body.
Environment
@percy/cli version: 1.28.8
The problem
We are uploading snapshots via a manual
POST /percy/snapshotAPI request, within apercy execinvocation.Sometimes, there is an error during asset discovery, and we see the following log lines:
However, the
POST /percy/snapshotrequest returns a200 OKresponse, with{"success": true}in the body. Therefore our build succeeds, even though the snapshot failed, and there is no way for us to detect the problem.I would expect a
500 Internal Server Errorresponse in this situation, and possibly some details in the response body.Environment
@percy/cliversion: 1.28.8