Skip to content

Windows Push Notification service (WNS) returns the wrong status code for rate limiting #3501

Open
@collimarco

Description

@collimarco

Describe the bug

From your docs:

406 Not Acceptable
The cloud service exceeded its throttle limit.
Please send your request after the Retry-After header value in the response

This is plain wrong and against the standard. You MUST return 429 Too Many Requests for rate limiting.

Returning 406 breaks various web push libraries and services, that don't handle the response properly.

For example: zaru/webpush#103

Steps to reproduce the bug

Send many web push messages in parallel to Edge / WNS.

Expected behavior

Return HTTP status 429 for rate limiting.

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-NotificationsToast notification, badges, Live Tiles, push notificationsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions