Skip to content

POST /percy/snapshot API - Error during asset discovery not reported #1649

@jonleighton

Description

@jonleighton

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions