anyproto / anyproto/anytype-api

Return 409 status on creating conflicting entities instead of 400

Open
#44 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
113
Forks
20
Avg merge
16m
Merged PRs (30d)
1

Description

Have you read a contributing guide?
  • I have read CONTRIBUTING.md
  • I have searched the existing requests and didn't find any that were similar
  • I have considered creating a pull request instead and want to proceed
Clear and concise description of the problem

Now, when the client tries to create an object that conflicts with an existing one (f.x. creating a Tag with the key which is already used in existing key object), API returns 400 error.

Suggested solution

I would expect 409 (Conflict) instead.

Alternative

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating the API endpoint for creating entities and the handling of conflicts that currently produces 400; inspect any related API tests, and consider the work done when duplicate-entity creation returns 409 instead.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.