Closed durgesh077 closed 1 year ago
Please assign me this issue.
Thanks for reporting this, the thing is we can fix this thing by JSON.stringify() before parsing it, so that It wont throw error, and the main thing to check is, if the json recieved by json can be fit in the type of MetacallJSON or not, if not we will simply respond back with incorrect metacall.json.
The server crashes whenever incorrect format of jsons (metadata ) is given while calling with api. For e.g. if we send (notice not using proper double quote ) { language_id: "file", "path":".", scripts:[] }
expected behaviour:- reponse should be of Bad request
actual :- server crashing
extra:- it will throw error, because JSON.parse on Filefetch controller of api.ts doesn't have try catch