ForgejoKit/Tests/ForgejoKitTests
pdurlej 8a5e513c50 feat: classify auth and service errors (#2)
Problem
- Callers currently need to inspect raw status codes to distinguish authentication, permission, not-found, and server failures.

Change
- Adds a small HTTPErrorCategory for 401, 403, 404, and 5xx responses.
- Exposes httpStatusCode and httpErrorCategory on ServiceError and AuthenticationError.
- Keeps the existing AuthenticationError cases intact and centralizes status-to-auth-error mapping.

Tests
- DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test

Co-authored-by: Piotr Durlej <pdurlej@users.noreply.github.com>
Reviewed-on: https://codeberg.org/secana/ForgejoKit/pulls/2
Reviewed-by: secana <secana@noreply.codeberg.org>
2026-05-12 17:41:24 +02:00
..
AdminServiceTests.swift feat: add new models and services 2026-03-11 21:57:40 +01:00
DateDecodingTests.swift feat: initial commit 2026-02-28 20:25:57 +01:00
DiffParserTests.swift feat: initial commit 2026-02-28 20:25:57 +01:00
ErrorMappingTests.swift feat: classify auth and service errors (#2) 2026-05-12 17:41:24 +02:00
FileContentTests.swift feat: initial commit 2026-02-28 20:25:57 +01:00
ModelDecodingTests.swift feat: add Forgejo Actions runs API (#1) 2026-05-07 16:42:16 +02:00
NormalizeServerURLTests.swift feat: initial commit 2026-02-28 20:25:57 +01:00
NotificationTests.swift feat: initial commit 2026-02-28 20:25:57 +01:00
RepositoryServiceURLTests.swift feat: add new models and services 2026-03-11 21:57:40 +01:00
URLSessionManagerTests.swift feat: initial commit 2026-02-28 20:25:57 +01:00
UserServiceTests.swift feat: add new models and services 2026-03-11 21:57:40 +01:00
WorkflowServiceURLTests.swift feat: add Forgejo Actions runs API (#1) 2026-05-07 16:42:16 +02:00