Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bugfix: now we log an error message when the postgres_pass target is …

…not found at all and returns 500 in this case instead of returning empty response.
  • Loading branch information...
commit 0bd9db4e0ab799ad08a4052d4fdfd8f73231147e 1 parent bcdcc62
@agentzh agentzh authored PiotrSikora committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/ngx_postgres_handler.c
View
5 src/ngx_postgres_handler.c
@@ -141,8 +141,11 @@ ngx_postgres_handler(ngx_http_request_t *r)
pglcf->upstream.upstream = ngx_postgres_find_upstream(r, &url);
if (pglcf->upstream.upstream == NULL) {
+ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+ "postgres: upstream name \"%V\" not found", &host);
+
dd("returning NGX_ERROR");
- return NGX_ERROR;
+ return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.