DoSomething / bertly

🔗 A serverless link shortener.
https://dosome.click/wq544
MIT License
2 stars 1 forks source link

Issue a 404 instead of 400 for unknown short code requests #18

Closed mshmsh5000 closed 6 years ago

mshmsh5000 commented 6 years ago

When handling a GET <key>, if the key isn't in the database, right now we return a 400 Bad Request:

    return jsonify({'error': 'url not found'}, 400)

This only makes sense in terms of the internal request. The requester would expect to get a 404 here.

mshmsh5000 commented 6 years ago

h/t @rapala61

mshmsh5000 commented 6 years ago

Closed with #19