Google Classroom, delete teacher from course backend Error 500

Google Classroom, delete teacher from course backend Error 500



I'm able to delete a teacher from a course but in this particular case I get this error (In Classroom API Reference ):



"error":
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"




From my NodeJS app:


code: 500,
message: 'Internal error encountered.',
errors:
[ message: 'Internal error encountered.',
domain: 'global',
reason: 'backendError' ],
status: 'INTERNAL'



The code (NodeJS app):


let classroom = google.classroom('v1');
let data =
auth : auth,
courseId : idCurso,
userId : emailDocente
;
classroom.courses.teachers.delete(data, (err, response) =>
//...code
);



I get this error from the UI.
enter image description here



More Info:



There are two teachers in the course: myemail@mydomain.com and
admin@mydomain.com admin@mydomain.com is the owner.



I need to remove myemail@mydomain.com The user is active and exists in GSuite Admin
SDK.





There are 3 types of ERRORS in the given link? Are you getting all the 3 errors? If not, which one?
– noogui
Jul 31 at 12:24





The first one as I mentioned in the OP is: When I try to delete a teacher from a course using the API Reference tool. The second one from my code when I call using the code I provided and the third one is deleting a teacher from google classroom UI.
– Diego
Jul 31 at 15:00




1 Answer
1



The error was caused by: the teacher was the owner of the google drive's folder. I had to delete from drive and the trash too. Developers should validate this and show a more clear message or delete the drive folder before deleting the teacher. Hope you guys update this. Thanks.



Update: I haven't been able to transfer ownership using drive API due to the fact that the user which I'm using to connect to the API doesn't have permission to change ownership I cannot have the real user to log in and change ownership because it's an automated process which runs every x minutes. I have to assign ownership of the drive folder to the user I connect to the API -not the real user- otherwise this will not work. I hope Google devs fix this.



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)