Skip to content

Fix proxy config error handling #830

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions bins/recipe-runner/src/runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ GglError runner(const RecipeRunnerArgs *args) {
&resp
);
switch (ret) {
case GGL_ERR_NOENTRY:
case GGL_ERR_NOMEM:
GGL_LOGE("Proxy URL too large.");
break;
case GGL_ERR_OK: {
resp.data[resp.len] = '\0';
Expand All @@ -618,8 +619,8 @@ GglError runner(const RecipeRunnerArgs *args) {
break;
}
default:
GGL_LOGE("Failed to get proxy url from config.");
return ret;
GGL_LOGW("Failed to get proxy url from config.");
break;
}

resp = GGL_BUF(resp_mem);
Expand All @@ -631,7 +632,8 @@ GglError runner(const RecipeRunnerArgs *args) {
&resp
);
switch (ret) {
case GGL_ERR_NOENTRY:
case GGL_ERR_NOMEM:
GGL_LOGE("noProxyAddresses value too large.");
break;
case GGL_ERR_OK: {
resp.data[resp.len] = '\0';
Expand All @@ -640,8 +642,8 @@ GglError runner(const RecipeRunnerArgs *args) {
break;
}
default:
GGL_LOGE("Failed to get noProxyAddresses from config.");
return ret;
GGL_LOGW("Failed to get noProxyAddresses from config.");
break;
}

static uint8_t thing_name_mem[MAX_THING_NAME_LEN + 1];
Expand Down
4 changes: 4 additions & 0 deletions docs/examples/sample_nucleus_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ services:
posixUser: "gg_component:gg_component"
greengrassDataPlanePort: "8443"
platformOverride: {}
networkProxy:
proxy:
url: ""
noProxyAddresses: ""
# aws.greengrass.fleet_provisioning:
# configuration:
# iotDataEndpoint: "<CONFIGURE_THIS>"
Expand Down
Loading