-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
type:featureNew feature or improvement of existing featureNew feature or improvement of existing feature
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
The errorMessage
field in the _PushStatus
class contains a key different from most errors thrown on the server. For these particular cases, the SDKs may decode _PushStatus
incorrectly.
Related to #7444
Steps to reproduce
Send a push notification that would produce an error so the errorMessage
field is populated
Actual Outcome
The error message contains the key, message
when most others would contain error
.
["results": [["pushTime": "2022-06-08T01:39:28.694Z", "objectId": "LUYnqQCC4dQlCq70yVBPoELfJp8DazsC", "source": "rest", "numSent": 0, "errorMessage": ["code": 105, "message": "Invalid key name: _method"], "updatedAt": "2022-06-08T01:39:28.732Z", "createdAt": "2022-06-08T01:39:28.695Z", "query": "{\"_method\":\"GET\",\"limit\":100,\"skip\":0,\"where\":{\"objectId\":{\"$ne\":null}}}", "pushHash": "5064192be6a88ae013ae516b4601dc95", "ACL": [:], "status": "failed", "payload": "{\"alert\":{\"body\":\"Hello from ParseSwift!\"},\"badge\":1}"]]]
Expected Outcome
Error messages sent from the server are uniform always contain the same keys.
"errorMessage": ["code": 105, "error": "Invalid key name: _method"] // Most server errors contain "error" instead of message
Environment
Server
- Parse Server version:
5.2.0
- Operating system: Linux/docker
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local
Database
- System (MongoDB or Postgres): Postgres
- Database version: 14
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc): Swift SDK
- SDK version: 4.5.0
Logs
Metadata
Metadata
Assignees
Labels
type:featureNew feature or improvement of existing featureNew feature or improvement of existing feature