-
Notifications
You must be signed in to change notification settings - Fork 5k
fix(server): tell the user when a repository lookup finds nothing #8371
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,6 +160,13 @@ export class SourceControlProviderError extends Schema.TaggedErrorClass<SourceCo | |
| repository: Schema.optional(Schema.String), | ||
| reference: Schema.optional(Schema.String), | ||
| detail: Schema.String, | ||
| /** | ||
| * Set only to a compile-time constant that is safe to show the user. | ||
| * `detail` may quote provider output and stays out of client-facing | ||
| * errors; `userDetail` is the adapter's explicit opt-in to surface a | ||
| * curated explanation instead of the generic fallback. | ||
| */ | ||
| userDetail: Schema.optional(Schema.String), | ||
|
Comment on lines
+163
to
+169
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Consider modeling it structurally instead of threading text: a dedicated not-found error class (or a Posted via Macroscope — Effect Service Conventions |
||
| cause: Schema.optional(Schema.Defect()), | ||
| }, | ||
| ) { | ||
|
|
||
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.
The wrapper's
detail— and thereforeSourceControlRepositoryError.message— is now taken from the cause's string field rather than from the wrapper's own structural attributes. Suggest classifying the provider failure here (e.g. on its tag/failureKind) into a structured reason or a distinct not-found error class, and deriving the user-facing sentence from that, so the message stays independent of provider-supplied text.Posted via Macroscope — Effect Service Conventions