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

[DXEX-629] pages: fix error when dumping error_page without html property #247

Merged
merged 1 commit into from
Jun 1, 2020

Conversation

shushen
Copy link
Contributor

@shushen shushen commented May 30, 2020

✏️ Changes

The error_page object in tenant setting may contain only a url property for redirection and without a html property for templating. Previously we assume html is always present and thus will attempt to pass undefined as the data argument to fs.writeFileSync(), which now throws error on Node.js 14.

This PR fixes this by skipping writing the template file when error_page does not have the property html. Tests for url and show_log_link in error_page were also added.

🔗 References

🎯 Testing

✅ This change has unit test coverage

🚫 This change has integration test coverage

🚫 This change has been tested for performance

Copy link
Contributor

@luisbritos luisbritos left a comment

Choose a reason for hiding this comment

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

Look good to me.

@shushen shushen merged commit 33c337d into master Jun 1, 2020
@shawnmclean shawnmclean deleted the export-page-failure branch January 21, 2021 03:53
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.

2 participants