Skip to content

Conversation

@sugyan
Copy link
Member

@sugyan sugyan commented Jul 6, 2025

Summary

  • Add SerdeJson error variant to Error enum
  • Replace unwrap() with proper error propagation in try_from_unknown

Related Issues

ref #319

Details

This change improves error diagnostics by replacing unwrap() with proper error propagation in the try_from_unknown function. While this doesn't directly fix the malformed date parsing issue reported in #319, it makes debugging easier by surfacing the actual errors instead of panicking.

The specific improvements:

  1. Added SerdeJson(#[from] serde_json::Error) variant to the Error enum
  2. Replaced serde_json::from_slice(&json).unwrap() with serde_json::from_slice(&json)? in types.rs:279

This will help identify and debug issues like malformed dates from the BlueSky API by providing proper error messages instead of panic.

- Add SerdeJson error variant to Error enum
- Replace unwrap() with proper error propagation in try_from_unknown
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.

2 participants