owncloud / owncloud/ocis

Missing SETTINGS_BUNDLES_PATH file should lead to proper error message

Open
#5,943 1 comment 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

## Describe the bug
If you set `SETTINGS_BUNDLES_PATH` to an invalid path (no file at the specified path), there is no proper error message like `File not found` or alike. Instead the error message: `Could not load bundles from path /etc/ocis/custom-roles.json: unexpected end of JSON input` is shown which seems at first hand that some JSON is wrong while indeed the file is missing

## Steps to reproduce

Steps to reproduce the behavior:

1. Set `SETTINGS_BUNDLES_PATH` to `/etc/ocis/test1234567` (and make sure you don't have this file by accident)

## Expected behavior
A log message like `File not found`

## Actual behavior
Log shows `Could not load bundles from path /etc/ocis/custom-roles.json: unexpected end of JSON input`

## Setup
Shouldn't matter here. I tested it with the helm charts and some modifications but I don't see a reason why this shouldn't happen in other environments too

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.