Aggregate server errors by endpoint

Build a dictionary from raw API events, then report required endpoints even when some have no failures.

SwiftCollections

Practice

An API dashboard receives raw response events. Product wants fixed rows for important endpoints, but only server errors should count toward the alert number.

Aggregate server-error counts by path, then print each required path. Missing paths should report 0, not disappear and not print nil.

swift 5.2

Edit the starter code, then Run to compile it and check your answer. Runs Swift 5.2 on the server (Linux); UIKit, SwiftUI, and long-running async are not supported.