Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: catch exception when getting notes folder #1486

Merged
merged 2 commits into from
Feb 20, 2025
Merged

Conversation

enjeck
Copy link
Contributor

@enjeck enjeck commented Feb 19, 2025

Currently, the app crashes the server with the following error. This should fix it.

Internal Server Error
The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.

Technical details
Remote Address: 192.168.21.4
Request ID: 1b5EZixWS2bZK7VIVCVm
Type: OCA\Notes\Service\NotesFolderException
Code: 0
Message: Notes is not a folder
File: /var/www/html/apps/notes/lib/Service/NoteUtil.php
Line: 213

Trace
#0 /var/www/html/apps/notes/lib/Service/NoteUtil.php(189): OCA\Notes\Service\NoteUtil->getOrCreateNotesFolder('admin', false)
#1 /var/www/html/apps/notes/lib/AppInfo/Capabilities.php(29): OCA\Notes\Service\NoteUtil->getNotesFolderUserPath('admin')
#2 /var/www/html/lib/private/CapabilitiesManager.php(61): OCA\Notes\AppInfo\Capabilities->getCapabilities()
#3 /var/www/html/lib/private/Template/JSConfigHelper.php(137): OC\CapabilitiesManager->getCapabilities(false, true)
#4 /var/www/html/lib/private/TemplateLayout.php(239): OC\Template\JSConfigHelper->getConfig()
#5 /var/www/html/lib/private/legacy/OC_Template.php(120): OC\TemplateLayout->__construct('user', 'dashboard')
#6 /var/www/html/lib/public/AppFramework/Http/TemplateResponse.php(189): OC_Template->fetchPage(Array)
#7 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(159): OCP\AppFramework\Http\TemplateResponse->render()
#8 /var/www/html/lib/private/AppFramework/App.php(161): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Dashboard\Controller\DashboardController), 'index')
#9 /var/www/html/lib/private/Route/Router.php(306): OC\AppFramework\App::main('OCA\\Dashboard\\C...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#10 /var/www/html/lib/base.php(1018): OC\Route\Router->match('/apps/dashboard...')
#11 /var/www/html/index.php(24): OC::handleRequest()
#12 {main}

@enjeck enjeck self-assigned this Feb 19, 2025
@enjeck enjeck requested a review from blizzz February 19, 2025 05:33
@enjeck enjeck force-pushed the catch-folder-exception branch from 227fa17 to ec92ea1 Compare February 19, 2025 05:33
@enjeck enjeck force-pushed the catch-folder-exception branch from 94e95f6 to 6c09605 Compare February 20, 2025 06:01
Signed-off-by: Cleopatra Enjeck M. <[email protected]>
@enjeck enjeck force-pushed the catch-folder-exception branch from 6c09605 to 2385a9b Compare February 20, 2025 06:12
@enjeck enjeck merged commit 1eb2a4b into main Feb 20, 2025
30 checks passed
@enjeck enjeck deleted the catch-folder-exception branch February 20, 2025 06:19
@enjeck enjeck mentioned this pull request Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants