Skip to content

fix: template render error [INS-4962]#8338

Merged
filfreire merged 6 commits into
Kong:developfrom
filfreire:feature/ins-4962-template-render-error
Feb 6, 2025
Merged

fix: template render error [INS-4962]#8338
filfreire merged 6 commits into
Kong:developfrom
filfreire:feature/ins-4962-template-render-error

Conversation

@filfreire

@filfreire filfreire commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

This PR closes INS-4962. Changes:

context

The bug was introduced after 10.3.0 due to the sanitization code we added in order to solve another bug (see 90bd25c#diff-28ee43a50d28cabb98317967663a3abd59d3e11c9fafa39bca88eed9d290c0b6R173).

Something about the variables.replaceIn(sanitizedRawUrl) call that happens on the insomnia sdk does not work well with this particular format of template tags {{ _['host_environment'] }}.

notes

One important thing to note, is that the code-path to render template tags in insomnia-sdk is a different one than the one we use on the app (for example for rendering the templates in the preview of the URL )

We might want to consider merging both to make use of old edge case fixes we already have done before the sdk.

Another side-note is that to debug this issue is a bit tricky as it requires:

  1. start hidden browser window
  2. send a request
  3. show hidden browser window
  4. going to dev tools of hidden browser window
image

@filfreire filfreire requested review from a team, ihexxa and ryan-willis February 6, 2025 13:18
@filfreire filfreire marked this pull request as draft February 6, 2025 14:30
ryan-willis
ryan-willis previously approved these changes Feb 6, 2025
@filfreire filfreire marked this pull request as ready for review February 6, 2025 14:49
@filfreire filfreire requested review from a team and ryan-willis February 6, 2025 15:02
gatzjames
gatzjames previously approved these changes Feb 6, 2025

@gatzjames gatzjames left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gatzjames
gatzjames previously approved these changes Feb 6, 2025
@filfreire filfreire enabled auto-merge (squash) February 6, 2025 15:48
@filfreire filfreire merged commit 62a21d3 into Kong:develop Feb 6, 2025
@filfreire filfreire deleted the feature/ins-4962-template-render-error branch February 6, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants