Skip to content

Respond with 400 or 409 when submitted shortening form is not accepted. #7

Description

@felixbade

At the moment Lyli always returns 200 to shortening form submissions. However, HTTP error codes would be more informative.

409 Conflict should be used when the submitted suffix is already in use.

This response is sent when a request conflicts with the current state of the server.

400 Bad Request should be used when the suffix isn’t allowed, or the long URL is malformed.

The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

The client should not repeat this request without modification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions