Bradly, yes. That's your verification, and I'm confirming too that data is only returned on successful queries. What are you looking to do that we could brainstorm a workaround together for?
let ctData = await restCaptionToolsAddVideo.trigger({additionalScope: {data: r}})
if (restCaptionToolsAddVideo.data.error) {
//Handle Error
}
Since .trigger() returns .data on a successful query, it should also return .data on a failed query in order to keep some constancy. So this seems like a design error if not a bug.
Something like is easier to intuit:
let ctData = await restCaptionToolsAddVideo.trigger({additionalScope: {data: r}})
if (ctData.error) {
//Handle Error
}