-
Notifications
You must be signed in to change notification settings - Fork 1
Implement InvalidRequestError #17
Copy link
Copy link
Open
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official Campaignarea:errorspriority:p1type:feature
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official Campaignarea:errorspriority:p1type:feature
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
Raised on HTTP 400/422 responses — malformed parameters, missing required fields, or out-of-range values. Should expose field-level validation details from the API so the developer knows which parameter is wrong.
Proposed Steps
InvalidRequestError(ShadeError)inerrors.py.param: Optional[str](the offending field name) andfield_errors: dict(all field errors from API response).{"error": {"code": "invalid_param", "param": "amount", "message": "..."}}.Acceptance Criteria
InvalidRequestError.error.paramnames the offending field when the API provides one.error.field_errorscontains all field-level errors from the API response.str(error)includes the param name in the message.