Open Fak3 opened 7 years ago
Updated with acceptance criteria, tasks and analysis
@zelima good work and much clearer.
One item: i don't understand the if 'version' not in data
snippet - what is it doing and why would we change to 404? BTW we don't need different error codes for different errors - we just need different error messages.
Finally, could you estimate this issue.
As we will have to put tags into url at some point, I think we should impose some restrictions on the format of a valid tag.
This is up to be discussed. I think we should only allow
a-zA-Z0-9._-
and no spaces.Acceptance criteria
a-zA-Z0-9._-
and no spaces allowed.400 Bad Request
if tag is not allowedTasks
tag_data_package(publisher, package)
to pass the testschange status code forATTRIBUTE_MISSING
to 404 (see analysis)Analysis
In the function responsible for tagging we have code snippet
Meaning we are already returning 400 for other error.
Think we should use 400 for invalid Tagging as it usually used to indicate Bad Request. see https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_errors
So for ATTRIBUTE_MISSING we can use 404