
Tech
RFC 7807 Error Envelope with DataWeave Try Function
Problem
My script failed when try lacked an explicit import from dw::Runtime . The runtime reported Unable to resolve reference of: try during execution. The documentation describes try as a function that returns a Result object for handling errors docs .
Input
{
"order" : { "id" : "ORD-2001" , "total" : "12.5O" }
}
Working configuration
%dw 2.0
// try() lives in dw::Runtime — not import...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to