Commit graph

5 commits

Author SHA1 Message Date
Stefan Hausotte
81c74f6dc3 chore: formatting and function names 2026-06-15 12:06:27 +02:00
Stefan Hausotte
b78c57ffd9 feat: add Attachment model and image upload support
- Add Attachment model with isImage computed property
- Add assets field to Issue, IssueComment, and PullRequest
- Add multipart/form-data upload support to ForgejoClient
- Add uploadIssueAttachment and uploadCommentAttachment to IssueService
2026-06-15 09:48:47 +02:00
Stefan Hausotte
167d61bc06 chore: improved formatting and linting 2026-06-04 11:29:23 +02:00
Stefan Hausotte
03829084c8 refactor: small code refactoring 2026-05-17 21:26:19 +02:00
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