Skip to content

Return an opaque error to the client instead of the error object - #8583

Open
NandhaKishorM wants to merge 1 commit into
nightscout:masterfrom
NandhaKishorM:fix/opaque-error-response
Open

Return an opaque error to the client instead of the error object#8583
NandhaKishorM wants to merge 1 commit into
nightscout:masterfrom
NandhaKishorM:fix/opaque-error-response

Conversation

@NandhaKishorM

Copy link
Copy Markdown

What this changes

Returns a fixed message instead of the raw error object when a Loop
notification fails, and moves the existing log call above the response.

Why

res.send(error) serialises whatever the callback produced straight to the
caller. Depending on the failure that can include upstream APNs response
detail, file paths or configuration fragments. The console.log immediately
below already captures the full error server-side, so operators lose nothing by
keeping the client response opaque.

Maps to CWE-209.

Notes

One line changed plus the reordering. If you would rather return a structured
{ status, message } body to match other endpoints here, say so and I will
amend.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant