Braintree/src/main/java/com/braintreepayments/api/exceptions/BraintreeError.java
@Nullable
    public BraintreeError errorFor(String field) {
        BraintreeError returnError;
        if (mFieldErrors != null) {
            for (BraintreeError error : mFieldErrors) {
                if (error.getField().equals(field)) {
                    return error;
                } else if (error.getFieldErrors() != null) {
                    returnError = error.errorFor(field);
                    if (returnError != null) {
                        return returnError;
                    }
                }
            }
        }
        return null;
    }
@Nullable
    public BraintreeError errorFor(String field) {
        BraintreeError returnError;
        if (mFieldErrors != null) {
            for (BraintreeError error : mFieldErrors) {
                if (error.getField().equals(field)) {
                    return error;
                } else if (error.getFieldErrors() != null) {
                    returnError = error.errorFor(field);
                    if (returnError != null) {
                        return returnError;
                    }
                }
            }
        }
        return null;
    }
Method to extract an error for an individual field, e.g. creditCard, customer, etc.

@param field Name of the field desired, expected to be in camelCase.
@return {@link BraintreeError} for the field searched, or {@code null} if not found.