-
Notifications
You must be signed in to change notification settings - Fork 98
Implement a typed GuildPass API transport with timeout, cancellation, and structured errors #448
Copy link
Copy link
Open
Labels
GrantFox OSSGrantFox Open Source Sponsorship program tagGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesIssue may qualify for a reward upon successful completion per campaign rulesThird CampaignOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsadvancedAdvanced difficulty tasks requiring significant domain knowledge and implementation effortAdvanced difficulty tasks requiring significant domain knowledge and implementation effortapiAPI routes, request handling, response contracts, and service integration workAPI routes, request handling, response contracts, and service integration workbackendBackend services, application logic, persistence integration, and server-side functionalityBackend services, application logic, persistence integration, and server-side functionalitytestingAutomated testing, integration testing, test infrastructure, and verification workAutomated testing, integration testing, test infrastructure, and verification work
Description
Activity
Metadata
Metadata
Assignees
Labels
GrantFox OSSGrantFox Open Source Sponsorship program tagGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesIssue may qualify for a reward upon successful completion per campaign rulesThird CampaignOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsadvancedAdvanced difficulty tasks requiring significant domain knowledge and implementation effortAdvanced difficulty tasks requiring significant domain knowledge and implementation effortapiAPI routes, request handling, response contracts, and service integration workAPI routes, request handling, response contracts, and service integration workbackendBackend services, application logic, persistence integration, and server-side functionalityBackend services, application logic, persistence integration, and server-side functionalitytestingAutomated testing, integration testing, test infrastructure, and verification workAutomated testing, integration testing, test infrastructure, and verification work
Difficulty: Advanced
Type: Feature
Recommended labels (if available in this repo): api, backend, testing, advanced
Background
GuildPass SDK V2 currently has a minimal client foundation but no reusable HTTP transport layer. Future SDK methods should not each implement fetch, timeout handling, cancellation, JSON parsing, and error conversion independently.
This issue introduces a standalone transport primitive that higher-level SDK methods can reuse later.
Problem
The SDK currently lacks a single typed transport abstraction for communicating with GuildPass Core.
Without one, future client methods may behave inconsistently around timeouts, non-2xx responses, aborted requests, malformed JSON, and network failures.
Expected Outcome
Implement a reusable HTTP transport module based on the standard Fetch API that performs requests and converts failures into stable typed SDK errors.
Suggested Implementation
Create a transport API conceptually similar to:
The transport should:
Acceptance Criteria
pnpm typecheckpasses.pnpm buildpasses.pnpm testpasses.Likely Affected Files/Directories
Independence Requirement
This issue must be implementable from the current
mainbranch without depending on any other open SDK issue.