1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-10-24 18:59:20 +03:00
Files
bookstack/app/Exceptions/ShowsApiExceptionMessage.php
Dan Brown 2183fc7fc8 API: Limited exception details shown
Updated exception handler to reduce the amount of detail shown to
prevent potentially sensitive details (like internal paths) being shown
in the error message.

Added an interface for specifically marking exceptions whos messages we
may want to show.

Thanks to Tanner Marks for reporting.
2026-07-28 13:27:42 +01:00

14 lines
375 B
PHP

<?php
namespace BookStack\Exceptions;
interface ShowsApiExceptionMessage
{
/**
* Get the message to be shown to the API user for this exception.
* This is used for non-debug scenarios, so should not contain sensitive information.
* The original exception message will be used in debug scenarios.
*/
public function getMessageForApi(): string;
}