Wraps unknown errors into X402Error for consistent error handling. If the error is already an X402Error, returns it unchanged.
The error to wrap
Error code to use if wrapping (default: EINTERNAL)
Message for wrapped error
Wraps unknown errors into X402Error for consistent error handling. If the error is already an X402Error, returns it unchanged.