Corrupted folders can't be removed

Bug description:
The folder can’ be loaded and when trying to remove it it gives and error. trying to load files in it via url just gives a 404 page.

Expected vs Current Behavior:
It should at least be able to be removed using the delete button.

Steps to reproduce:
unknown.

Bug appears at this link:
https://replit.com/@pooiod7/ScratchX#api/projects/index.php

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

Replit Profile: https://replit.com/@pooiod7