mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
sentry id on 500s (#856)
This commit is contained in:
parent
8a1d5bc94a
commit
a72ea34a81
2 changed files with 10 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ class ErrorsController < ApplicationController
|
|||
@status_code = 500
|
||||
@title = "Internal Server Error"
|
||||
@message = "Something went wrong on our end, but we are looking into it!"
|
||||
@sentry_event_id = Sentry.last_event_id
|
||||
render_error
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flex flex-col sm:flex-row gap-4">
|
||||
<%= link_to "Go Home", root_path, class: "px-6 py-3 bg-primary text-white rounded-lg font-medium hover:bg-red-600 transition-colors" %>
|
||||
<%= link_to "Go Home", root_path, class: "px-6 py-3 bg-primary text-white rounded-lg font-medium hover:bg-primary/75 transition-colors" %>
|
||||
<button onclick="history.back()" class="px-6 py-3 bg-dark text-white rounded-lg font-medium hover:bg-darkless transition-colors border border-darkless cursor-pointer">
|
||||
Go Back
|
||||
</button>
|
||||
|
|
@ -19,4 +19,12 @@
|
|||
If this problem persists, please contact us on
|
||||
<%= link_to "Slack", "https://hackclub.slack.com", class: "text-primary hover:underline", target: "_blank" %>.
|
||||
</p>
|
||||
|
||||
<% if @sentry_event_id.present? %>
|
||||
<div class="mt-4 p-3 bg-darkless rounded-lg border border-dark">
|
||||
<p class="text-xs text-muted">
|
||||
Error ID: <code class="text-primary select-all"><%= @sentry_event_id %></code>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue