Skip to content

API feature: return existing link with error on creation #912

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mxsbc
Copy link

@mxsbc mxsbc commented May 20, 2025

Thanks for this awesome project!

This PR adds a simple feature to the link creation API endpoint: returns the existing link item together with the error message and sets the status code to 409.

My use case is that I need to update the target address while keeping the customurl unchanged, given only the customurl is known. While the feature of this PR achieves my goal, but I have to get it done with two requests (get the id from the error message and update the existing record using the id).

Please let me know if there're similar use cases so I might continue with more complex solutions like "create or update" which could get the job done in single request.

mxsbc and others added 2 commits May 19, 2025 17:31
return the existing link record and 409 status code when trying to create with a customurl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant