Skip to content

DT-137: Return clearer error messages #137#138

Merged
kigiri merged 3 commits into
masterfrom
137-return-clearer-error-messages
May 20, 2026
Merged

DT-137: Return clearer error messages #137#138
kigiri merged 3 commits into
masterfrom
137-return-clearer-error-messages

Conversation

@abdotop
Copy link
Copy Markdown
Member

@abdotop abdotop commented May 14, 2026

Improve error handling and clarity in API responses

@abdotop abdotop requested a review from kigiri May 14, 2026 17:22
@abdotop abdotop self-assigned this May 14, 2026
@abdotop abdotop linked an issue May 14, 2026 that may be closed by this pull request
@abdotop abdotop force-pushed the 137-return-clearer-error-messages branch from a96da89 to 12f04f2 Compare May 17, 2026 23:11
Comment thread api/lib/fetcher.ts Outdated
let timeoutId: number | undefined
if (init?.timeoutMs) {
timeoutId = setTimeout(() => controller.abort(), init.timeoutMs)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AbortSignal.timeout(123)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this should not be handled here in this API, but instead when we call it, instead of doing:
{ timeoutMs: 3600 }

We would do:
{ signal: AbortSignal.timeout(3600) }

👍

Comment thread api/lib/fetcher.ts Outdated
}
}

export function fetchErrorDetails(err: unknown): string {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't like this generic error details, I think it's a bad abstraction, to be relevant we want the caller to define the error details correctly when recieved

@kigiri kigiri merged commit 4ff25aa into master May 20, 2026
2 checks passed
@kigiri kigiri deleted the 137-return-clearer-error-messages branch May 20, 2026 14:29
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.

Return clearer error messages

2 participants