check status code for 400 or 403 for delete folder with file api