]> granicus.if.org Git - icinga2/commit
Improve error handling for empty packages in /v1/config/packages
authorMichael Friedrich <michael.friedrich@icinga.com>
Wed, 7 Mar 2018 12:27:31 +0000 (13:27 +0100)
committerJean Flach <jean-marcel.flach@icinga.com>
Tue, 13 Mar 2018 10:03:02 +0000 (11:03 +0100)
commit1969a9071a488398a1bb906285e1f94b3c5f54bb
treea2994933847e1493698558b96058e2b04a347876
parentddab94feb35050d4e50ab13a1958e65dfbc058b6
Improve error handling for empty packages in /v1/config/packages

- If there is no package main directory, assume "empty packages".
- Catch exceptions thrown through GlobRecursive() and present a better http 500
to the user.

The packages directory tree is automatically created with the first
package creation, either from the user, or by the `_api` package.

fixes #6129
lib/remote/configpackageshandler.cpp
lib/remote/configpackageutility.cpp