Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Improve default error logging #21

@Secreto31126

Description

@Secreto31126

Rather than using axios error.message, the code should report the API error response. For example, I was getting a 400 error, which turned out to be because the previous version was still pending verification.

I think something like

error.response.data.itemError.forEach(e => core.setFailed(e.error_detail));

in run()'s catch condition should do the work. Maybe add conditional chaining to avoid no response errors, but I don't know if that works in typescript.


P.S.: I had been testing the code on a fork, and I can't make it work. Idk why, the response message should be in error.response.data, but its content is different to the original response.data debuged.

In my case, I'm expecting to see the following response:

{
   "kind":"chromewebstore#item",
   "id":"...",
   "uploadState":"FAILURE",
   "itemError":[{
      "error_code":"ITEM_NOT_UPDATABLE",
      "error_detail":"The item cannot be updated now because it is in pending review, ready to publish, or deleted status."
   }]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions