I tried to replicate the scenario and the error you are facing is because you are using malformed API URL to access mailFolder's subFolders. Please ensure to below endpoint to access user's specific mail folders messages or subfolders
https://graph.microsoft.com/v1.0/users/rohit@3b8zzq.onmicrosoft.com/mailFolders/<mailFolderId>/childFolders
https://graph.microsoft.com/v1.0/users/rohit@3b8zzq.onmicrosoft.com/mailFolders/<mailFolderId>/messages
Please make sure you replace <mailFolderId> with Id of folder you want to access. Also ensure you provide Mail.ReadBasic application permission to access another user's mailbox.
For more details, please refer List Messgaes
I hope this helps!
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment