@DanielFandiño
I don't use grade passback, so let me offer some general ideas with the caveat that none may be helpful.
Does the HTTP Response statusText property contain the message? 422 is a HTTP Response code and it's contained in the status property. The statusText is supposed to include a more human-friendly form.
The error message returned by Canvas should give an indication of the problem. The SIS Error Code Dictionary makes it look like you should be able to use the message property of the response field.
Canvas has a SIS Resources page, which includes the SIS Error Code Dictionary, and guides for many SISs. You may be able to find something specific to your SIS there.
I also found this thread Gradepassback Error Codes in the Community. The message from @MrReed on August 30, 2021, has links to other resources including a nice slideshow with videos explaining things for Infinite Campus.