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

Unclear error message when there is a validation error in custom-policies.json #9861

Closed
5 tasks done
edwardfoyle opened this issue Feb 25, 2022 · 0 comments · Fixed by #9862
Closed
5 tasks done

Unclear error message when there is a validation error in custom-policies.json #9861

edwardfoyle opened this issue Feb 25, 2022 · 0 comments · Fixed by #9862
Labels
bug Something isn't working p3 platform-state Issues related to project state management

Comments

@edwardfoyle
Copy link
Member

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

14

Amplify CLI Version

latest

What operating system are you using?

mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

no

Amplify Categories

function

Amplify Commands

push

Describe the bug

When there is a validation error in a custom-policies.json file for a function, the message does not make it obvious what the error is.

Expected behavior

A clear error message of the validation failure

Reproduction steps

  1. amplify init -y
  2. amplify add function
  3. update custom-policies.json and specify a string instead of an array for Resource
  4. amplify push -y
  5. Observe unclear error message: should be array

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line


Additional information

No response

@edwardfoyle edwardfoyle added bug Something isn't working functions Issues tied to the functions category p3 platform-state Issues related to project state management and removed functions Issues tied to the functions category labels Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p3 platform-state Issues related to project state management
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant