Skip to content

Conversation

@devin-ai-integration
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

@devin-ai-integration
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

3 participants