Skip to content

When a Permission error happens we get a NullPointer Exception. A meaningful exception should be returned. #47

Open
@nicolasgarnier

Description

@nicolasgarnier

If we try to perform an operation on the GitHub API that is not allowed by lack of permission (for instance we authorized only to read public data access but we try to write or create something). We get an error like this:

The null object does not have a method 'map'. NoSuchMethodError: method not found: 'map' Receiver: null Arguments: [Closure: (dynamic) => dynamic]

And a 404 is logged in the JS console:

Failed to load resource: the server responded with a status of 404 (Not Found) https://api.github.com/repos/nicolasgarnier/test2/issues

Ideally we should get a meaningful error thrown instead of the NullPointerException.

FYI fixing this issue might be hard because I believe GitHub should be returning a 403 instead of a 404. This is a bug in the GitHub API and I've let GitHub know about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy