X_ERROR_UNDECLARED
Means
a handler threw a 4xx code its errors: list does not declare
Typical cause
an action or query declares errors: and its handler threw a refusal outside that list, in a test or development run or in the contract scan of the handler source
Fix
add '<CODE>' to errors: in the declaration the cause names, or stop throwing it there, then: x verify --only contract