Answer the question
In order to leave comments, you need to log in
What to return if the object does not exist?
There is an API:
/users/{id}
/groups/{id}/add?categiry={categiry_id}
What result should be returned if the given {id} does not exist?
What result should be returned if the given group category {categiry_id} does not exist?
What result should be returned if the given {id} or the given group category {categiry_id} does not exist?
Answer the question
In order to leave comments, you need to log in
statuses - select the appropriate status and return it in the response with a message, you can make a list of constants and some kind of dock with their description, or you can simply textually tell what the problem is
. If there is no suitable status, then no one bothers to add your own (for example, in laravel 419 is actively used because it is not reserved)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question