You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce this bug:
Go to https://editor.p5js.org/sketches/any_id/assets/any_file and 502 is returned.
The problem is caused by the fact that the function getFileContent which is supposed to handle this route isn't verifying whether the returned object from database is null or not and it's also not checking for undefined asset name.
Because the sketch/file does not exist, a 404 error should be returned.
The text was updated successfully, but these errors were encountered:
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.
thegitone23
changed the title
Method getFileContent doesn't handle invalid project id
Method handeling route to get assets corresponding to a project isn't handeling invalid project id or empty asset parameter
Feb 18, 2020
catarak
changed the title
Method handeling route to get assets corresponding to a project isn't handeling invalid project id or empty asset parameter
Wrong status code returned for sketch/file that does not exist
Mar 30, 2020
Nature of issue?
Details about the bug:
Go to https://editor.p5js.org/sketches/any_id/assets/any_file and 502 is returned.
The problem is caused by the fact that the function getFileContent which is supposed to handle this route isn't verifying whether the returned object from database is null or not and it's also not checking for undefined asset name.
Because the sketch/file does not exist, a 404 error should be returned.
The text was updated successfully, but these errors were encountered: