x-yzt / mixtures

Mixtures.info website source code.

Home Page:https://www.mixtures.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/combo/ endpoint throws 500 when interactants cannot be found

x-yzt opened this issue · comments

commented

Correct behavior:

  • 404 if no interactant is provided (bare /combo/)

  • 400 if a single interactant is provided (/combo/a/ whereas a exists or not)

  • 404 if a single valid interactant is provided (/combo/a+mdma/ where a does no exist)
    returns an useless empty page for now

  • 404 if any interactant is invalid (/combo/a+mdma+lsd where a does not exist)
    for now, invalid interactants are ignored, if 2 valid interactants cannot be found 500 is throwed

    Writing unit tests for these can be a good idea.