> Amended and rebased. What do you think about my exit code implementation?
Looking at submit.py there are multiple cases where ValueError is used that seem more like a 400 than a 403, so if we were to look at a simple solution I'd suggest using TypeError for a duplicate request and return a 403 with that.
However, that doesn't feel very clean and I think we should instead look at using a custom exception so that we can more be more granular with our exit / return codes. (I thought I also saw some cases where we'd ideally return a 401 instead of a 400.)
In the interest of just getting this done though let's do the simple solution (or something like it) now and create a card, or bug, for improving the way in which we use http status codes.
> Amended and rebased. What do you think about my exit code implementation?
Looking at submit.py there are multiple cases where ValueError is used that seem more like a 400 than a 403, so if we were to look at a simple solution I'd suggest using TypeError for a duplicate request and return a 403 with that.
However, that doesn't feel very clean and I think we should instead look at using a custom exception so that we can more be more granular with our exit / return codes. (I thought I also saw some cases where we'd ideally return a 401 instead of a 400.)
In the interest of just getting this done though let's do the simple solution (or something like it) now and create a card, or bug, for improving the way in which we use http status codes.