aws-amplify / aws-amplify/amplify-cli

Display failure message when adding a APNS with incorrect .p12 key

Open
#11,940 1 comment 0 reactions 0 assignees View on GitHub
bug notifications p2
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### How did you install the Amplify CLI?

_No response_

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

_No response_

### Amplify CLI Version

10.7.1

### 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.

none

### Describe the bug

When passing in path to the incorrect p12 key and Amplify CLI fails as expected but with the following error.

```
Failed to enable the APNS channel
```

this does not provide the correct reason for failure. The reason for failure is in the report generated by amplify CLI in the error.json file under the `downstreamException` block containing the `message` key.
For example:

![image](https://user-images.githubusercontent.com/87995712/217577628-2d60ef88-208e-4f62-844a-a45bba73fd25.png)
![image](https://user-images.githubusercontent.com/87995712/217580361-62f0bf14-eadf-4b7a-b2b2-f56d0fc189c7.png)

### Expected behavior

Expose the error message on CLI

### Reproduction steps

1. Add notifications
2. select APNS
3. provide an incorrect p12 key
observe error message in CLI and report generated

### Project Identifier

6e0e57ade2748b686ffbd2270e6ba6d1

### Log output

```
# Put your logs below this line

```

### Additional information

_No response_

### Before submitting, please confirm:

- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.