Skip to content

Commit cce9159

Browse files
authored
Merge pull request #60 from nextcloud/fix/enable-error-report
fix: report errors to app_api on enable
2 parents a9035fe + cde5d3a commit cce9159

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ async def enabled_handler(enabled: bool, nc: AsyncNextcloudApp) -> str:
162162
try:
163163
await nc.providers.task_processing.unregister(APP_ID)
164164
app_enabled.clear()
165+
return ""
165166
except Exception as e:
166167
logger.error(f"Error unregistering the app: {e}")
167-
168-
return ""
168+
return f"Error unregistering the app: {e}"
169169

170170
languages = [
171171
ShapeEnumValue(name=lang_name, value=lang_id)
@@ -188,7 +188,7 @@ async def enabled_handler(enabled: bool, nc: AsyncNextcloudApp) -> str:
188188
await nc.providers.task_processing.register(provider)
189189
except Exception as e:
190190
logger.error(f"Error registering the app: {e}")
191-
return ""
191+
return f"Error registering the app: {e}"
192192

193193
if not app_enabled.is_set():
194194
app_enabled.set()

0 commit comments

Comments
 (0)