Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an exception when an entity-level action would be invoked witho… #723

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Nov 12, 2021

  1. Throw an exception when an entity-level action would be invoked witho…

    …ut an id.
    
    Entity-level actions are performed on a specific resource, and so the id value
    in the request is mandatory. Today, if the client forgets to call .id(...) to
    supply a value the request can be built and sent to the server where it will
    cause an error with a mysterious error message that implies that there is no
    action of that name, i.e.
    "POST operation named myAction not supported on resource '...' URI: '...'"
    
    Here we fix that so that
    a) The problem is caught on the client side during the RequestBuilder.build()
       method call so that the request cannot be sent to the server.
    b) A sensible error message is given where the stack trace's line number will
       lead the developer straight to the root of the problem:
       "Missing or null id value; we cannot invoke this entity-level action."
    haroldl committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    a133830 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2021

  1. Configuration menu
    Copy the full SHA
    0a9eb23 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2021

  1. Configuration menu
    Copy the full SHA
    f378a57 View commit details
    Browse the repository at this point in the history