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.
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.
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.
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