%dw 2.0
output application/json
import * from dw::Runtime
var myInput = {
    name :"bla",
    lasName: "lala"
}
fun findAndFail(obj) = obj match  {
    case is Object -> obj mapObject ((value, key) -> (key): findAndFail(value))
    else -> if(true) fail("my Error" ) else obj
}
---
// try(() -> fail("myerror"))
try(() -> findAndFail(myInput))
