Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message if data table is not present #117

Open
ryanblock opened this issue Feb 3, 2024 · 0 comments
Open

Improve error message if data table is not present #117

ryanblock opened this issue Feb 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ryanblock
Copy link
Member

Currently, if the data table required by Begin Data is not present, you may get an unhelpful error such as

/path/to/project/node_modules/@aws-lite/client/src/error.js:13
  let err = error instanceof Error ? error : Error()
                                             ^
ParameterNotFound: @aws-lite/client: SSM.GetParameter: unknown error
    at errorHandler (/path/to/project/node_modules/@aws-lite/client/src/error.js:13:46)
    at GetParameter (/path/to/project/node_modules/@aws-lite/client/src/client-factory.js:211:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  statusCode: 400,
  headers: {
    'content-type': 'application/json',
    date: 'Sat, 03 Feb 2024 20:51:57 GMT',
    connection: 'close',
    'content-length': '45'
  },
  __type: 'ParameterNotFound',
  code: 'ParameterNotFound',
  service: 'ssm',
  property: 'SSM',
  awsDoc: 'https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_GetParameter.html',
  readme: 'https://aws-lite.org/services/ssm#getparameter',
  time: '2024-02-03T20:51:57.603Z'
}

We should improve that output as it is not helpful.

See: https://github.com/beginner-corp/begin-data/blob/main/src/helpers/_get-table-name.js#L45

@ryanblock ryanblock added the bug Something isn't working label Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant