changed err to match ripple-lib