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

Improve a couple of http kernel error messages #3442

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

shyamnamboodiripad
Copy link
Contributor

Including hyperlink that explains the expected format for the $datetime and $timestamp dynamic variables in a couple more error messages.

@shyamnamboodiripad shyamnamboodiripad enabled auto-merge (squash) February 5, 2024 07:46
@shyamnamboodiripad shyamnamboodiripad changed the title Improve a couple of error messages Improve a couple of http kernel error messages Feb 5, 2024
@@ -1194,7 +1194,7 @@ public async Task invalid_option_produces_error()
""";

var result = await kernel.SendAsync(new SubmitCode(code));
result.Events.Should().ContainSingle<DiagnosticsProduced>().Which.Diagnostics.Should().ContainSingle().Which.Message.Should().Be("The supplied option 't' in the expression '$datetime 'yyyy-MM-dd' -1 t' is not supported.");
result.Events.Should().ContainSingle<DiagnosticsProduced>().Which.Diagnostics.Should().ContainSingle().Which.Message.Should().Be("The supplied option 't' in the expression '$datetime 'yyyy-MM-dd' -1 t' is not supported. The following options are supported: ms, s, m, h, d, w, M, Q, y. See https://aka.ms/http-date-time-format for more details.");
Copy link
Member

Choose a reason for hiding this comment

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

do we need this to be localised?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, all of the parser diagnostics need to be localized. And since the parser package is source-only, we need to do be able to localize in both the current repo and the internal repo. We have discussed this before and have some ideas around how to do this. There will be a follow up PR around this before long.

@shyamnamboodiripad shyamnamboodiripad merged commit d351aa2 into dotnet:main Feb 5, 2024
4 checks passed
@shyamnamboodiripad shyamnamboodiripad deleted the improveerrors branch February 5, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants