Skip to content

Friendly wrap boto error for function not found #11

Description

@adjohn

Make this error more friendly:

Traceback (most recent call last):
  File "/Users/adjohn/.local/bin/iopipe", line 11, in <module>
    load_entry_point('iopipe-cli==0.1', 'console_scripts', 'iopipe')()
  File "/Users/adjohn/.local/lib/python3.6/site-packages/iopipe_cli/cli.py", line 144, in main
    cli()
  File "/Users/adjohn/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/adjohn/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/adjohn/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/adjohn/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/adjohn/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/adjohn/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/adjohn/.local/lib/python3.6/site-packages/iopipe_cli/cli.py", line 48, in api_install
    resp = update.apply_function_api(region, function, layer_arn, token, java_type)
  File "/Users/adjohn/.local/lib/python3.6/site-packages/iopipe_cli/update.py", line 99, in apply_function_api
    info = AwsLambda.get_function(FunctionName=function_arn)
  File "/Users/adjohn/.local/lib/python3.6/site-packages/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/Users/adjohn/.local/lib/python3.6/site-packages/botocore/client.py", line 661, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the GetFunction operation: Function not found: arn:aws:lambda:us-west-2:554407330061:function:examples-dev-upper

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions