As for the first point, I will share your thoughts about the error code with the team
About the second point, we only have 2 endpoints, the regular one you are calling and the one for files. As of today there is no way of getting all the folder IDs of the folders in a specific workspace. You would need to query for boards, with their specific folder ID and check their workspace ID.