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.
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.
400 Bad Request should be used when the suffix isn’t allowed, or the long URL is malformed.