Skip to content

Refuse a request that cannot be generated with a clear message #68

Open

Description

@KurbyDoo

Background

A request with a zero or negative size gets as far as generation before anything goes wrong. The failure then comes from somewhere deep in the generation code and says nothing useful about what was actually wrong with the request.

Description

Check a request at the entry point, before any generation starts, and refuse it with a message saying what was wrong with it.

A refused request must leave nothing part generated behind.

Testing:

  • Assert a request with a size of zero is refused with a clear message
  • Assert a request with a negative size is refused with a clear message
  • Assert a refused request never starts generating
  • Assert a valid request is not refused
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions