Skip to content

Commit

Permalink
Merge pull request #3673 from Bhashinee/master
Browse files Browse the repository at this point in the history
Fix getting 404 response when observability is enabled
  • Loading branch information
Bhashinee authored Oct 9, 2024
2 parents 8b6d3d9 + 084650d commit e2be222
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,10 @@ private String getApiName(String contextPath, MessageContext synCtx) {
if (RESTUtils.matchApiPath(contextPath, apiContextPath)) {
apiName = api.getName();
synCtx.setProperty(RESTConstants.PROCESSED_API, api);
// if we match to a versioned API, search should stop.
// else check other API's to see if there is a match
if (StringUtils.isNotEmpty(api.getVersion())) {
break;
}
// Since the APIs are already sorted in descending order, we should stop at the first match with the context path.
// Continuing the loop could result in matching a path that only shares the same starting string.
// Ex: /test/ API context path will match with /test/1.0.0
break;
}
}
return apiName;
Expand Down

0 comments on commit e2be222

Please sign in to comment.