Skip to content

Conversation

shinriyo
Copy link

@shinriyo shinriyo commented Jul 5, 2018

When we I mistook lambda.json format (ex. like miswrite ,), it tell us what file was mistook.

When we I mistook `lambda.json` format (ex. like miswrite ,), it tell us what file was mistook.
@jarosser06
Copy link
Contributor

Currently if I have an invalid JSON file the error message comes back "ValueError: Expecting , delimiter: line 4 column 3 (char 50)" which provides me a reason why the JSON file is not valid.

Your proposed PR only tells us that the configuration file is invalid, not why. I would prefer the error message be more informative than "x" file is bad. Can you rewrite the error to include the original error message as well as what file is incorrect.

Also after testing on my local setup, your PR doesn't appear to work for Python 2.7.

⁉️ Unexpected error. Please report this traceback.
Uploader: 1.3.0
Botocore: 1.4.4
Boto3: 1.5.26

Traceback (most recent call last):
  File "/home/jim/Projects/lambda-uploader/lambda_uploader/shell.py", line 194, in main
    _execute(args)
  File "/home/jim/Projects/lambda-uploader/lambda_uploader/shell.py", line 58, in _execute
    variables=args.variables)
  File "/home/jim/Projects/lambda-uploader/lambda_uploader/config.py", line 47, in __init__
    self._load_config(config_file)
  File "/home/jim/Projects/lambda-uploader/lambda_uploader/config.py", line 199, in _load_config
    except json.decoder.JSONDecodeError:

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants