Reputation: 4467
I have a use case where a user can share his trip through a URL and this particular trip is allowed to generate only 10 different URL in the system. In case user tends to create 11th URL, I have to send the message that
location sharing with the trip has reached max count of 10
I looked on the internet for this and found a status code 429
, relating to indicates the user has sent too many requests in a given amount of time ("rate limiting"). But this is confusing me with rate limiting and resource limiting(request is served only a given number of time).
Hence not able to decide, need the advice or solution to proceed.
Upvotes: 1
Views: 1430
Reputation: 201
You are confusing the concept of too many web requests within a certain period, and some business logic on your back-end which does not give the ability to the user to perform that action anymore. I believe you should return a 400 error (bad request) with the error message of your choice to display to the user
Upvotes: 1