Skip to content

Commit

Permalink
Merge pull request #78 from Klebert-Engineering/bugfix/no-http-settin…
Browse files Browse the repository at this point in the history
…gs-error-message

Make the error message regarding missing HTTP settings less dramatic.
  • Loading branch information
josephbirkner authored Mar 15, 2022
2 parents 0d1007b + 8430aeb commit 9028642
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(FetchContent)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(ZSWAG_VERSION 1.2.0)
set(ZSWAG_VERSION 1.2.1)

if (NOT MSVC)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
5 changes: 5 additions & 0 deletions libs/httpcl/src/http-settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ void Settings::load()
return;
}

if (!httplib::detail::is_file(cookieJar)) {
log().debug("The HTTP_SETTINGS_FILE path '{}' is not a file.", cookieJar);
return;
}

try {
log().debug("Loading HTTP settings from '{}'...", cookieJar);
auto node = YAML::LoadFile(cookieJar);
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ connexion
requests
zserio>=2.4.2
pyyaml
pyzswagcl>=1.2.0
pyzswagcl>=1.2.1
openapi-spec-validator

0 comments on commit 9028642

Please sign in to comment.