Skip to content

appstore-update action crashes on catalog paths containing spaces #164

Description

@alaurie

Describe the Bug

The daily appstore-update.yml workflow fails when processing catalog entries whose file paths contain spaces (for example: Gonzivang/SecondTry/CodeResources/Apache Camel/camel-main/jbang-catalog.json).

Root Cause

  1. Unencoded URL in github-api: When GHContent.read() is called on search results, the underlying library attempts to refresh the content URL
    (https://api.github.com/repositories/.../contents/CodeResources/Apache Camel/...). The unencoded space triggers a URISyntaxException: Illegal character in path, which is wrapped in an
    org.kohsuke.github.HttpException with response code -1.
  2. Unhandled -1 HTTP status in retry loop: The error handler in appstore.java only skips known status codes (400, 404, 422, 451, 403). Because response code -1 is not skipped, the script
    treats it as a transient rate-limit error, exhausts 5 retries (sleeping 1 minute per retry), and finally re-throws the exception, terminating the action with a failure.

Stack Trace

org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/repositories/747354479/contents/CodeResources/Apache
Camel/camel-main/jbang-catalog.json?ref=...
Caused by: java.io.IOException: Invalid URL
Caused by: java.net.URISyntaxException: Illegal character in path at index 75: https://api.github.com/repositories/747354479/contents/CodeResources/Apache Camel/camel-main/jbang-catalog.json?ref=...


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions