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

fix: handle missing attributes when using select param #397

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix KeyError when using select parameter with threads/messages API.

When using the select parameter to request specific fields, the API would throw a KeyError for missing attributes that weren't requested. This fix adds infer_missing=True to handle missing attributes gracefully.

Fixes #395

Link to Devin run: https://app.devin.ai/sessions/c7f701d535544b338abf03ec960537dc

- Add infer_missing=True to ListResponse.from_dict to handle missing attributes
- Add test case to verify select parameter behavior
- Fixes #395

Co-Authored-By: Aaron de Mello <[email protected]>
@johnjjung
Copy link
Contributor

#395

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

@AaronDDM AaronDDM merged commit b68c893 into main Dec 13, 2024
5 checks passed
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.

Error in fetching Email Threads/Messages usingselect query param
2 participants