RocketChat / RocketChat/Rocket.Chat

Include failure.response.reason in logger.debug for APNS push failure - 400 status code

Open
#22,726 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

This is not a bug, but would be useful in troubleshooting. (Sorry if I didn't post this in the right place)

I'm testing my whitelabeled iOS app and the push call to the APNS is intermittently failing with a 400 status code. The debug does show the 400 status but doesn't display the rest of the response.

On app/push/server/apn.js, could we include the failure.response.reason please?

From:
logger.debug('Got error code ${ failure.status } for token ${ userToken }');

To:
logger.debug('Got error code ${ failure.status } ${ failure.response.reason } for token ${ userToken }');

Thank you.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open app/push/server/apn.js and inspect the existing logger.debug call for APNS failures. Include the response reason in that debug output, then verify that failed push logs show both the status and reason without breaking the existing token information.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript
Domain
backend
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.