Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Add static error page #4276

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

Merged
merged 3 commits into from
Oct 3, 2022
Merged

feat: Add static error page #4276

merged 3 commits into from
Oct 3, 2022

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma commented Sep 30, 2022

Screen Shot 2022-09-30 at 13 41 54

@BrunoQuaresma BrunoQuaresma self-assigned this Sep 30, 2022
@BrunoQuaresma BrunoQuaresma requested a review from a team as a code owner September 30, 2022 16:45
@BrunoQuaresma BrunoQuaresma requested review from jsjoeio and deansheather and removed request for a team September 30, 2022 16:45
Copy link
Contributor

@jsjoeio jsjoeio left a comment

Choose a reason for hiding this comment

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

Nice work!

<h1>502 - Bad Gateway</h1>
<p>No service is running on port 3000. Make sure your process is running and try again.</p>
<div class="button-group">
<button id="retry">Retry</button>
Copy link
Member

Choose a reason for hiding this comment

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

Will this button be dynamic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably. I think this is something that Go template can handle right?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, controlled by .Error.RetryEnabled

@deansheather
Copy link
Member

Added the go template variables and made a few changes:

  • Added justify-content: center to .button-group so the return to site button would be centered when the retry button was not present
  • Inlined the window.location.reload() to avoid making the JS conditional as well

@BrunoQuaresma BrunoQuaresma merged commit c7aea2f into main Oct 3, 2022
@BrunoQuaresma BrunoQuaresma deleted the bq/error branch October 3, 2022 14:42
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.

4 participants