Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewErrParamMinLen func returns struct with code ParamMinValueErrCode instead of ParamMinLenErrCode #1335

Closed
deedweird opened this issue Jun 11, 2017 · 2 comments
Assignees
Labels
bug This issue is a bug.

Comments

@deedweird
Copy link
Contributor

Please fill out the sections below to help us address your issue.

Version of AWS SDK for Go?

1.8.39 (master)

Version of Go (go version)?

go version go1.8 windows/amd64

What issue did you see?

In https://github.com/aws/aws-sdk-go/blob/master/aws/request/validation.go

func NewErrParamMinLen(field string, min int) *ErrParamMinLen {
	return &ErrParamMinLen{
		errInvalidParam: errInvalidParam{
			code:  ParamMinValueErrCode,
			field: field,
			msg:   fmt.Sprintf("minimum field size of %v", min),
		},
		min: min,
	}
}

The intended value for the code field probably is ParamMinLenErrCode, not ParamMinValueErrCode.

Steps to reproduce

@jasdel
Copy link
Contributor

jasdel commented Jun 12, 2017

Thanks identifying this bug @deedweird. I'll review this but I think you are correct the error code here should of been MinLen not MinValue.

@jasdel jasdel added the bug This issue is a bug. label Jun 12, 2017
@jasdel jasdel self-assigned this Jun 12, 2017
@jasdel jasdel closed this as completed in aff9ab6 Jun 12, 2017
@jasdel
Copy link
Contributor

jasdel commented Jun 12, 2017

The change looked good @deedweird. Let us know if you run into any additional issues, have questions, or feedback.

This was referenced Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants