When using Rest API how can I use data from a handled error within On error workflow?

The same error that you see in the sidebar is available under the name “current error”