Skip to content

Improve error message if data table is not present #117

Description

@ryanblock

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions