Function returning error and source


I have a function returning this:

return {
error: Failed to delete invite for user ${uninvitedUserId} to team ${teamId},
source: [deleteInviteResult.error, deleteInviteResult.source]

I need to get source deleteInviteResult.error in source. Is it possible?
I don’t see how to get it using .failure( let error)

I use SwiftSDK

Thanks for your help