-
Notifications
You must be signed in to change notification settings - Fork 218
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
Conversation
There was a problem hiding this 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.
@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"; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
|
||
namespace Microsoft.Identity.Web | ||
{ | ||
internal static class ErrorMessage |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good. thanks, henry
…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