Skip to content

/notifications interface return "Unable to parse If-Modified-Since request header" #1985

@AsherSu

Description

@AsherSu

Describe the bug
/notifications interface return "Unable to parse If-Modified-Since request header"

To Reproduce
Steps to reproduce the behavior:

github.listNotifications()
                .nonBlocking(true)
                .participating(false)
                .read(true)    
                .iterator()
                .next()
                .getRepository()
                .getOwnerName()

Expected behavior
return owner

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

Caused by: org.kohsuke.github.HttpException: {"message":"Unable to parse If-Modified-Since request header. Please make sure value is in an acceptable format.","documentation_url":"https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user","status":"422"}
	at org.kohsuke.github.GitHubConnectorResponseErrorHandler$1.onError(GitHubConnectorResponseErrorHandler.java:83)
	at org.kohsuke.github.GitHubClient.detectKnownErrors(GitHubClient.java:504)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:464)
	at org.kohsuke.github.GitHubPageIterator.fetch(GitHubPageIterator.java:146)
	at org.kohsuke.github.GitHubPageIterator.hasNext(GitHubPageIterator.java:93)
	at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:116)
	at org.kohsuke.github.PagedIterator.nextPageArray(PagedIterator.java:144)
	at org.kohsuke.github.PagedIterable.toArray(PagedIterable.java:85)
	at org.kohsuke.github.GitHubPageContentsIterable.toResponse(GitHubPageContentsIterable.java:70)
	at org.kohsuke.github.GHNotificationStream$1.fetch(GHNotificationStream.java:194)
	... 5 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions