Skip to content
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

Log warning if integration doesn't match base class #459

Merged
merged 2 commits into from
Jun 19, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ protected override void MarshallRequest(InvokeFeatures features, APIGatewayProxy
requestFeatures.Scheme = "https";
requestFeatures.Method = apiGatewayRequest.HttpMethod;

if (string.IsNullOrWhiteSpace(apiGatewayRequest.RequestContext?.DomainName))
{
_logger.LogWarning($"Request does not contain domain name information but is derived from {nameof(APIGatewayProxyFunction)}.");
}

string path = null;
if (apiGatewayRequest.PathParameters != null && apiGatewayRequest.PathParameters.ContainsKey("proxy") &&
!string.IsNullOrEmpty(apiGatewayRequest.Resource))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ protected override void MarshallRequest(InvokeFeatures features, ApplicationLoad
throw new Exception("Unable to determine header mode, single or multi value, because both Headers and MultiValueHeaders are null.");
}

if (lambdaRequest.RequestContext?.Elb?.TargetGroupArn == null)
{
_logger.LogWarning($"Request does not contain ELB information but is derived from {nameof(ApplicationLoadBalancerFunction)}.");
}

// Look to see if the request is using mutli value headers or not. This is important when
// marshalling the response to know whether to fill in the the Headers or MultiValueHeaders collection.
// Since a Lambda function compute environment is only one processing one event at a time it is safe to store
Expand Down