`with` construct usage question - variables in `else`

I am looking for something like in this simplified example:

with\
	%{key: true} <- result = a_function_returning_map()
do
	:success
else
	_ -> IO.inspect(result)
end

The with construct seems like a good fit for the stream of various actions that may fail and return different results. I can recognise which of them failed based on a specific “fingerprint” of the failure but would like to have full result too. Any suggestions? Or back to nested cases/ifs and Co.?