Status decoding error shouldn't prevent timeline loading #478

Closed
opened 2024-05-19 18:52:14 +00:00 by shadowfacts · 0 comments
Owner

Better workaround than f6e57d664f

the timeline request should return [TryDecode<Status>] with something like:

enum TryDecode<T: Decodable>: Decodable {
    case error(String)
    case value(T)
    
    init(from decoder: any Decoder) throws {
        do {
            self = .value(try T(from: decoder))
        } catch {
            self = .error(error.localizedDescription)
        }
    }
}

then timelines/etc. can display the per-status error

Better workaround than f6e57d664fef2f0d3cb43e136e79e3d041879a32 the timeline request should return `[TryDecode<Status>]` with something like: ```swift enum TryDecode<T: Decodable>: Decodable { case error(String) case value(T) init(from decoder: any Decoder) throws { do { self = .value(try T(from: decoder)) } catch { self = .error(error.localizedDescription) } } } ``` then timelines/etc. can display the per-status error
shadowfacts added this to the 2024.3 milestone 2024-05-19 18:52:14 +00:00
shadowfacts added the
bug
label 2024-05-19 18:52:14 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: shadowfacts/Tusker#478
No description provided.