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

Refine the error messages in devicetwin/dttype #1952

Merged
merged 2 commits into from
Aug 3, 2020

Conversation

sailorvii
Copy link
Contributor

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:
NONE

@kubeedge-bot kubeedge-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 21, 2020
@kubeedge-bot kubeedge-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 21, 2020
@fisherxu
Copy link
Member

lgtm, would you like to squash the commits?

@kubeedge-bot kubeedge-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 21, 2020
@daixiang0
Copy link
Member

Better to use a more meaningful title.

@sailorvii
Copy link
Contributor Author

Better to use a more meaningful title.

Yes, I just new a branch named oneword and push the change. Not clear why it's used by the pull request message.

@kadisi
Copy link
Member

kadisi commented Jul 21, 2020

@sailorvii please squash the commits

@sailorvii sailorvii changed the title Oneword Refine the error messages in devicetwin/dttype Jul 21, 2020
ErrorUnmarshalInfo = "Unmarshal update request body failed, please check the request"
ErrorUpdateInfo = "Update twin error, key:twin does not exist"
ErrorKeyInfo = "The key of twin must only include upper or lowercase letters, number, english, and special letter - _ . , : / @ # and the length of key should be less than 128 bytes"
ErrorValueInfo = "The value of twin must only include upper or lowercase letters, number, english, and special letter - _ . , : / @ # and the length of value should be less than 512 bytes"
Copy link
Member

@kadisi kadisi Jul 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using errors. Errorf () or errors.New()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comments.
Done.

Copy link
Member

@kadisi kadisi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some nits

Signed-off-by: sailorvii <challengingway@hotmail.com>
@fisherxu
Copy link
Member

fisherxu commented Aug 3, 2020

/lgtm
/approve

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 3, 2020
@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fisherxu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2020
@kubeedge-bot kubeedge-bot merged commit c95a035 into kubeedge:master Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants