imgflo / imgflo-server

HTTP image processing server based on imgflo
48 stars 7 forks source link

Missing input should be 422 instead of 500 #52

Open jonnor opened 8 years ago

jonnor commented 8 years ago

Someone requested /graph/vahj1ThiexotieMo/be4fd455664471c56f4e43eab85b0f16/gradientmap.jpg (without mandtory input=) and got a HTTP 500

jonnor commented 8 years ago

Full URL for above case https://imgflo.herokuapp.com/graph/vahj1ThiexotieMo/be4fd455664471c56f4e43eab85b0f16/gradientmap.jpg?stop1=0.1&stop2=0.3&stop3=0.5&stop4=0.7&stop5=0.9&color1=%23330000&color2=%23660000&color3=%23CC0000&color4=%23B3B3B3&color5=%23E6E6E6&srgb=True&input=https%3A%2F%2Fthe-grid-user-content.s3-us-west-2.amazonaws.com%2Fb2febc11-0345-47ad-b09d-c8845fe2ffa6.jpg&width=1122&height=1532

jonnor commented 8 years ago

Actually it has input=, so this is likely a duplicate of #38. Waiting to close until we have a testcase which verifies 422 behavior on missing input.