[PR #12927] [MERGED] fix(server): http error parsing on endpoints without a default response #13753

Closed
opened 2026-02-05 15:20:16 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/12927
Author: @jrasm91
Created: 9/25/2024
Status: Merged
Merged: 9/25/2024
Merged by: @jrasm91

Base: mainHead: fix/10166


📝 Commits (1)

  • 224d2aa fix(server): http error parsing on endpoints without a default response

📊 Changes

13 files changed (+162 additions, -18 deletions)

View changed files

📝 mobile/openapi/README.md (+1 -0)
📝 mobile/openapi/lib/api.dart (+1 -0)
📝 mobile/openapi/lib/api/notifications_api.dart (+9 -1)
📝 mobile/openapi/lib/api_client.dart (+2 -0)
mobile/openapi/lib/model/test_email_response_dto.dart (+99 -0)
📝 open-api/immich-openapi-specs.json (+18 -0)
📝 open-api/typescript-sdk/src/fetch-client.ts (+7 -1)
📝 server/src/controllers/notification.controller.ts (+2 -1)
server/src/dtos/notification.dto.ts (+3 -0)
📝 server/src/services/notification.service.spec.ts (+0 -5)
📝 server/src/services/notification.service.ts (+5 -7)
📝 server/test/repositories/notification.repository.mock.ts (+1 -1)
📝 web/src/lib/utils/handle-error.ts (+14 -2)

📄 Description

Fixes #10166

You can see in the open api spec, that this endpoint did not have a default resopnse, so open-api assumed it was a string and did not parse the response. This is why handleError was unable to extract the message correctly.

This PR fixes that parsing, but also adds a default response for this endpoint (returns messageId).

Before After
image image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/12927 **Author:** [@jrasm91](https://github.com/jrasm91) **Created:** 9/25/2024 **Status:** ✅ Merged **Merged:** 9/25/2024 **Merged by:** [@jrasm91](https://github.com/jrasm91) **Base:** `main` ← **Head:** `fix/10166` --- ### 📝 Commits (1) - [`224d2aa`](https://github.com/immich-app/immich/commit/224d2aaa27f600f555070788e546d1fa392216be) fix(server): http error parsing on endpoints without a default response ### 📊 Changes **13 files changed** (+162 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `mobile/openapi/README.md` (+1 -0) 📝 `mobile/openapi/lib/api.dart` (+1 -0) 📝 `mobile/openapi/lib/api/notifications_api.dart` (+9 -1) 📝 `mobile/openapi/lib/api_client.dart` (+2 -0) ➕ `mobile/openapi/lib/model/test_email_response_dto.dart` (+99 -0) 📝 `open-api/immich-openapi-specs.json` (+18 -0) 📝 `open-api/typescript-sdk/src/fetch-client.ts` (+7 -1) 📝 `server/src/controllers/notification.controller.ts` (+2 -1) ➕ `server/src/dtos/notification.dto.ts` (+3 -0) 📝 `server/src/services/notification.service.spec.ts` (+0 -5) 📝 `server/src/services/notification.service.ts` (+5 -7) 📝 `server/test/repositories/notification.repository.mock.ts` (+1 -1) 📝 `web/src/lib/utils/handle-error.ts` (+14 -2) </details> ### 📄 Description Fixes #10166 You can see in the open api spec, that this endpoint did not have a default resopnse, so open-api assumed it was a string and did not parse the response. This is why `handleError` was unable to extract the message correctly. This PR fixes that parsing, but also adds a default response for this endpoint (returns `messageId`). | Before | After | | - | - | | ![image](https://github.com/user-attachments/assets/a0b90d99-5390-4989-bbad-2f8bc41249d3) | ![image](https://github.com/user-attachments/assets/f8dfcde6-cfe9-41d4-85dd-f2518c4d7d3c) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 15:20:16 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#13753