[PR #4291] [MERGED] Fix API returns HTTP 500 instead of 404 on not found #6340

Closed
opened 2026-02-05 10:29:41 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4291
Author: @devdot
Created: 6/8/2023
Status: Merged
Merged: 6/15/2023
Merged by: @ssddanbrown

Base: developmentHead: fix-api-404


📝 Commits (4)

  • ecf99fa Add test showing the "HTTP 500 on not found" bug
  • 9ba7d1e Fix "HTTP 500 on not found" bug #4290
  • 321a459 Refactor exception handling by using interface
  • 34d8268 Refactor notify exception to clean up api exception handling

📊 Changes

4 files changed (+93 additions, -12 deletions)

View changed files

📝 app/Exceptions/Handler.php (+2 -6)
📝 app/Exceptions/NotifyException.php (+36 -4)
📝 app/Exceptions/PrettyException.php (+34 -2)
📝 tests/Api/PagesApiTest.php (+21 -0)

📄 Description

Fix issue #4290 as described here: https://github.com/BookStackApp/BookStack/issues/4290#issuecomment-1582151669


🔄 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/BookStackApp/BookStack/pull/4291 **Author:** [@devdot](https://github.com/devdot) **Created:** 6/8/2023 **Status:** ✅ Merged **Merged:** 6/15/2023 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `fix-api-404` --- ### 📝 Commits (4) - [`ecf99fa`](https://github.com/BookStackApp/BookStack/commit/ecf99fa0edbddc5c47eb94b9cb3b5f22c65890ee) Add test showing the "HTTP 500 on not found" bug - [`9ba7d1e`](https://github.com/BookStackApp/BookStack/commit/9ba7d1e6c58c3730c343ea7730372f2890dbcfcc) Fix "HTTP 500 on not found" bug #4290 - [`321a459`](https://github.com/BookStackApp/BookStack/commit/321a4594219a39e9d10b601168e139c1b926e373) Refactor exception handling by using interface - [`34d8268`](https://github.com/BookStackApp/BookStack/commit/34d8268b2b20d62781b40274686b7492c890294a) Refactor notify exception to clean up api exception handling ### 📊 Changes **4 files changed** (+93 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `app/Exceptions/Handler.php` (+2 -6) 📝 `app/Exceptions/NotifyException.php` (+36 -4) 📝 `app/Exceptions/PrettyException.php` (+34 -2) 📝 `tests/Api/PagesApiTest.php` (+21 -0) </details> ### 📄 Description Fix issue #4290 as described here: https://github.com/BookStackApp/BookStack/issues/4290#issuecomment-1582151669 --- <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 10:29:41 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6340