Thanks for reporting this. The response itself is an API bug where an internal error is being returned instead of the correct BuildTargetsResolutionError response. The fix to this behavior is on the way.
Regarding the BuildTargetsResolutionError issue that you’re hitting, this means one or both of your target resources (ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e , ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43) are not buildable by your token. This could be either because the resources don’t have transforms deployed on them, or because the token used for this request lacks build permissions on them.
However, OAuth2 applications can have a further restricted permissions than their creator user where their access is configured in the corresponding Developer Console application and service user settings. See Authentication for production apps and Developer console application scopes sections of the docs for more on details.