apify-cli icon indicating copy to clipboard operation
apify-cli copied to clipboard

Cryptic error message when `actor.json` is an invalid JSON

Open netmilk opened this issue 1 year ago • 0 comments

$ cat .actor/actor.json
{
  boo < ------------------------- invalid JSON
        "actorSpecification": 1,
        "name": "my-actor",
        "version": "0.0",
        "buildTag": "latest",
        "environmentVariables": {
    "dockerFile": "./Dockerfile",
    "dockerContext": "../",
    "input": "./input_schema.json"
  }
}
$ apify push
    SyntaxError: Expected property name or '}' in JSON at position 4 (line 2 column 3)

Expected behavior would be to indicate the invalid file path. Something in the spirit of:

$ apify push
'.actor/actor.json' isn't a valid JSON:
   SyntaxError: Expected property name or '}' in JSON at position 4 (line 2 column 3)

netmilk avatar May 02 '24 15:05 netmilk