You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle missing user theme_preference on sign in (#91)
coder/coder#16564 has the Coder server no longer send the `theme_preference` field in a `/api/v2/user` response.
The Swift `JSONDecoder` requires that a missing field be explicitly marked as optional, else the deserialization fails. To make it less likely this happens again, we'll only require `id` and `username` be present.
We'll do the same for the other SDK types and only require the minimum fields the app needs be present.
This PR also improves the error message on any decoding error:
<img width="259" alt="Screenshot 2025-03-06 at 1 35 33 pm" src="https://github.com/user-attachments/assets/0fef147c-29ad-41bf-9aff-29651ff6b796" />
0 commit comments