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

non-retryable-err-types exercise #4

Merged
merged 31 commits into from
Jan 22, 2025
Merged

Conversation

angelazhou32
Copy link
Collaborator

No description provided.

Copy link
Contributor

@axfelix axfelix left a comment

Choose a reason for hiding this comment

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

Mostly readme edits again, found exactly one extra close parenthesis, otherwise all great

exercises/non-retryable-err-types/README.md Outdated Show resolved Hide resolved
exercises/non-retryable-err-types/README.md Outdated Show resolved Hide resolved
axfelix and others added 17 commits January 16, 2025 12:35
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.8 to 1.4.12.
- [Commits](qos-ch/logback@v_1.4.8...v_1.4.12)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.33.0.
- [Commits](golang/net@v0.22.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
exercises/non-retryable-err-types/solution/Web/Program.cs Outdated Show resolved Hide resolved
Comment on lines +38 to +41
logger.LogError("Unable to process credit card: {Message}", err.Message);
throw new ApplicationFailureException(
message: "Invalid credit card number error",
details: new[] { order.Customer.CreditCardNumber });
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure you want to swallow the error and stack trace and such from where the activity actually errored? You can make it the inner exception or something. For most users, catching an error just to rethrow it is unnecessary unless the caller really needs it a certain way. Also, for many users, catching an error just to log it and rethrow may be unnecessary.

Choose a reason for hiding this comment

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

This is a good callout. We have some content in the course content about swallowing exceptions and the consequences of doing so. This is currently how this portion of the exercise does it in all the other language courses, so for now we're going to swallow the error here. We have created a ticket, EDU-3826, to re-evaluate this section of the code during our next maintenance period and see if we want to update it, or at the very least, call out in the README that we are intentionally swallowing the exception here. Thanks for the suggestion 😄

…ent a reusable class, still need to address try/catch
@angelazhou32 angelazhou32 merged commit 4707958 into main Jan 22, 2025
3 of 6 checks passed
@angelazhou32 angelazhou32 deleted the non-retryable-err-types branch January 31, 2025 02:15
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.

5 participants