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

initial commit for creating a const files for errors, log messages an… #280

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

jennyf19
Copy link
Collaborator

@jennyf19 jennyf19 commented Jul 1, 2020

…d string values
#261
I had some spare time and thought to get started on this. not complete, but a start, so we can add to it as we go. have made files for constant string values, log messages and error messages. good idea @pmaytak

Copy link
Contributor

@pmaytak pmaytak left a comment

Choose a reason for hiding this comment

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

This is great. Thanks.

I have some suggestions like capitalization and missing periods but I'll include them in separate PRs.

@jennyf19 jennyf19 merged commit 75d9719 into master Jul 2, 2020
@jennyf19 jennyf19 deleted the constantsFile branch July 2, 2020 03:13
@jennyf19
Copy link
Collaborator Author

jennyf19 commented Jul 2, 2020

@pmaytak sounds good. thanks.

public const string IssuerDoesNotMatchValidIssuers = "Issuer: '{0}', does not match any of the valid issuers provided for this application.";
public const string ClientInfoReturnedFromServerIsNull = "client info returned from the server is null";
public const string MissingClientCredentials = "missing_client_credentials";
public const string DuplicateClientCredentials = "duplicate_client_credentials";
Copy link
Contributor

Choose a reason for hiding this comment

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

These looks a bit like error codes, meaning something depends on these values being recognized? Perhaps those should be in a separate file.


namespace Microsoft.Identity.Web
{
internal static class ErrorMessage
Copy link
Contributor

Choose a reason for hiding this comment

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

ErrorMessage [](start = 26, length = 12)

Would be interesting to try out adding an error identifier in the beginning of the error message, e.g. MIDW-0000001: the error text goes here. This way it will be easier to find the actual error when searching?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, Wilson does this. Is there a standard on how to properly create these error codes?

Copy link
Contributor

Choose a reason for hiding this comment

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

not aware of a standard. but rules are, never re-use an id. it's ok to delete id's that are not used anymore, but it has to be ensured that id is not ever used by some other message (Wilson does this by commenting out the entry)

@henrik-me
Copy link
Contributor

@jennyf19 @pmaytak . a few late comments with ideas for a future iteration.


namespace Microsoft.Identity.Web
{
internal static class ErrorMessage
Copy link
Contributor

Choose a reason for hiding this comment

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

ErrorMessage [](start = 26, length = 12)

A couple of late messages for consideration in a future PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sounds good. thanks, henry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants