Accessing Error Object from runPromise in Effect Library

hello I'm having a situtation with runPromise

const { data: userInfoResponse, error, isLoading } =
useSWR(
'getUserInfo',
compose(
getUserInfo,
Effect.runPromise),
onErrorRetryForArtistDashboard(lang),
)

in my onErrorRetryForArtistDashboard I want to access the properties of the error object returned in the Effect but the runPromise return a string is there any option to catch a promise and have a access to the error object returned from the effect?
Was this page helpful?