mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
better error handling (#677)
* swap honeybadger for sentry * better error pages
This commit is contained in:
parent
0260a16c6c
commit
64fc0f1f1b
18 changed files with 117 additions and 729 deletions
2
Gemfile
2
Gemfile
|
|
@ -37,8 +37,6 @@ gem "solid_cable"
|
|||
gem "stackprof"
|
||||
gem "sentry-ruby"
|
||||
gem "sentry-rails"
|
||||
# Trying out sentry alternative
|
||||
gem "honeybadger"
|
||||
|
||||
gem "good_job"
|
||||
|
||||
|
|
|
|||
|
|
@ -228,9 +228,6 @@ GEM
|
|||
groupdate (6.7.0)
|
||||
activesupport (>= 7.1)
|
||||
hashie (5.0.0)
|
||||
honeybadger (6.1.3)
|
||||
logger
|
||||
ostruct
|
||||
htmlcompressor (0.4.0)
|
||||
http (5.3.1)
|
||||
addressable (~> 2.8)
|
||||
|
|
@ -609,7 +606,6 @@ DEPENDENCIES
|
|||
flipper-ui
|
||||
geocoder
|
||||
good_job
|
||||
honeybadger
|
||||
htmlcompressor (~> 0.4.0)
|
||||
http
|
||||
importmap-rails
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ module Api
|
|||
existing:
|
||||
}
|
||||
rescue => e
|
||||
Honeybadger.notify(e, context: { slack_uid: slack_uid, email: email, params: params.to_unsafe_h })
|
||||
Sentry.capture_exception(e, extra: { slack_uid: slack_uid, email: email, params: params.to_unsafe_h })
|
||||
render json: { error: "internal error creating magic link" }, status: 500
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
before_action :set_paper_trail_whodunnit
|
||||
before_action :honeybadger_context, if: :current_user
|
||||
before_action :sentry_context, if: :current_user
|
||||
before_action :initialize_cache_counters
|
||||
before_action :try_rack_mini_profiler_enable
|
||||
before_action :track_request
|
||||
|
|
@ -25,11 +25,14 @@ class ApplicationController < ActionController::Base
|
|||
@activities = PublicActivity::Activity.limit(25).order(created_at: :desc).includes(:owner, :trackable)
|
||||
end
|
||||
|
||||
def honeybadger_context
|
||||
Honeybadger.context(
|
||||
user_id: current_user.id,
|
||||
def sentry_context
|
||||
Sentry.set_user(
|
||||
id: current_user.id,
|
||||
username: current_user.username
|
||||
)
|
||||
Sentry.set_extras(
|
||||
user_agent: request.user_agent,
|
||||
ip_address: request.headers["CF-Connecting-IP"] || request.remote_ip,
|
||||
ip_address: request.headers["CF-Connecting-IP"] || request.remote_ip
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
|||
43
app/controllers/errors_controller.rb
Normal file
43
app/controllers/errors_controller.rb
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ErrorsController < ApplicationController
|
||||
skip_before_action :verify_authenticity_token
|
||||
|
||||
def bad_request
|
||||
@status_code = 400
|
||||
@title = "Bad Request"
|
||||
@message = "The server cannot process your request due to invalid syntax."
|
||||
render_error
|
||||
end
|
||||
|
||||
def not_found
|
||||
@status_code = 404
|
||||
@title = "Page Not Found"
|
||||
@message = "The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved."
|
||||
render_error
|
||||
end
|
||||
|
||||
def unprocessable_entity
|
||||
@status_code = 422
|
||||
@title = "Unprocessable Content"
|
||||
@message = "The request was well-formed but unable to be followed due to semantic errors."
|
||||
render_error
|
||||
end
|
||||
|
||||
def internal_server_error
|
||||
@status_code = 500
|
||||
@title = "Internal Server Error"
|
||||
@message = "Something went wrong on our end, but we are looking into it!"
|
||||
render_error
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def render_error
|
||||
render "errors/show", status: @status_code, layout: error_layout
|
||||
end
|
||||
|
||||
def error_layout
|
||||
"errors"
|
||||
end
|
||||
end
|
||||
|
|
@ -12,8 +12,8 @@ class SessionsController < ApplicationController
|
|||
|
||||
if params[:error].present?
|
||||
Rails.logger.error "Slack OAuth error: #{params[:error]}"
|
||||
uuid = Honeybadger.notify("Slack OAuth error: #{params[:error]}")
|
||||
redirect_to root_path, alert: "Failed to authenticate with Slack. Error ID: #{uuid}"
|
||||
Sentry.capture_message("Slack OAuth error: #{params[:error]}")
|
||||
redirect_to root_path, alert: "Failed to authenticate with Slack. Error ID: #{Sentry.last_event_id}"
|
||||
return
|
||||
end
|
||||
|
||||
|
|
@ -67,8 +67,8 @@ class SessionsController < ApplicationController
|
|||
|
||||
if params[:error].present?
|
||||
Rails.logger.error "GitHub OAuth error: #{params[:error]}"
|
||||
uuid = Honeybadger.notify("GitHub OAuth error: #{params[:error]}")
|
||||
redirect_to my_settings_path, alert: "Failed to authenticate with GitHub. Error ID: #{uuid}"
|
||||
Sentry.capture_message("GitHub OAuth error: #{params[:error]}")
|
||||
redirect_to my_settings_path, alert: "Failed to authenticate with GitHub. Error ID: #{Sentry.last_event_id}"
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
|||
22
app/views/errors/show.html.erb
Normal file
22
app/views/errors/show.html.erb
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<div class="flex flex-col items-center justify-center text-center p-8 max-w-3xl">
|
||||
<div class="mb-6">
|
||||
<div class="text-8xl font-bold text-primary mb-2"><%= @status_code %></div>
|
||||
<h1 class="text-3xl font-bold text-white mb-4"><%= @title %></h1>
|
||||
</div>
|
||||
|
||||
<div class="bg-dark rounded-xl p-6 mb-6 border border-darkless">
|
||||
<p class="text-muted text-lg"><%= @message %></p>
|
||||
</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" %>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<p class="mt-8 text-sm text-muted">
|
||||
If this problem persists, please contact us on
|
||||
<%= link_to "Slack", "https://hackclub.slack.com", class: "text-primary hover:underline", target: "_blank" %>.
|
||||
</p>
|
||||
</div>
|
||||
25
app/views/layouts/errors.html.erb
Normal file
25
app/views/layouts/errors.html.erb
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="<%= Rails.env == "production" ? "production" : "development" %>" data-theme="dark">
|
||||
<head>
|
||||
<title><%= @title %> - Hackatime</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="color-scheme" content="dark">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
<%= favicon_link_tag asset_path('favicon.png'), type: 'image/png' %>
|
||||
<%= stylesheet_link_tag :app %>
|
||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
|
||||
</head>
|
||||
|
||||
<body class="bg-darker">
|
||||
<div class="flex min-h-screen items-center justify-center mx-auto">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -53,5 +53,6 @@ module Harbor
|
|||
|
||||
config.middleware.use HtmlCompressor::Rack
|
||||
config.middleware.use Rack::Attack
|
||||
config.exceptions_app = routes
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
---
|
||||
# For more options, see https://docs.honeybadger.io/lib/ruby/gem-reference/configuration
|
||||
|
||||
api_key: 'hbp_IET1u9vKrC7IWjt45arAsfguTrGSFR1bSxEq'
|
||||
|
||||
# The environment your app is running in.
|
||||
env: "<%= Rails.env %>"
|
||||
|
||||
# The absolute path to your project folder.
|
||||
root: "<%= Rails.root.to_s %>"
|
||||
|
||||
# Honeybadger won't report errors in these environments.
|
||||
development_environments:
|
||||
- test
|
||||
- development
|
||||
- cucumber
|
||||
- production # temporary disable
|
||||
|
||||
# By default, Honeybadger won't report errors in the development_environments.
|
||||
# You can override this by explicitly setting report_data to true or false.
|
||||
# report_data: true
|
||||
|
||||
# The current Git revision of your project. Defaults to the last commit hash.
|
||||
# revision: null
|
||||
|
||||
# Enable verbose debug logging (useful for troubleshooting).
|
||||
debug: false
|
||||
|
||||
# Ignore noisy errors
|
||||
exceptions:
|
||||
ignore:
|
||||
- GoodJob::ActiveJobExtensions::Concurrency::ConcurrencyExceededError
|
||||
|
||||
# disable insights lol
|
||||
insights:
|
||||
enabled: false
|
||||
|
|
@ -2,4 +2,10 @@
|
|||
# between 0 and 1.0 to sample on a portion of instances.
|
||||
Autotuner.enabled = true
|
||||
|
||||
# The rest is handled by the honeybadger gem.
|
||||
Autotuner.reporter = proc do |report|
|
||||
Sentry.capture_message(
|
||||
"Autotuner Suggestion",
|
||||
level: :info,
|
||||
extra: { report: report.to_s }
|
||||
)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
# Honeybadger programmatic error filtering to prevent rate limit exhaustion
|
||||
Honeybadger.configure do |config|
|
||||
@error_counts = Hash.new { |hash, key| hash[key] = { hourly: [], daily: [] } }
|
||||
|
||||
# Rate limiting configuration
|
||||
MAX_ERRORS_PER_HOUR = 10
|
||||
MAX_ERRORS_PER_DAY = 50
|
||||
|
||||
config.before_notify do |notice|
|
||||
if notice.error_class == "Norairrecord::Error" && notice.error_message&.include?("HTTP 429")
|
||||
return false
|
||||
end
|
||||
|
||||
error_index = generate_error_index notice
|
||||
|
||||
should_ignore = rate_limit_exceeded? error_index
|
||||
|
||||
record_error_occurrence error_index unless should_ignore
|
||||
|
||||
!should_ignore
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def generate_error_index(notice)
|
||||
if notice.backtrace&.any?
|
||||
first_stack_line = notice.backtrace.first
|
||||
"#{notice.error_class}:#{first_stack_line}"
|
||||
else
|
||||
controller = notice.context[:controller]
|
||||
action = notice.context[:action]
|
||||
"#{notice.error_class}:#{controller}:#{action}"
|
||||
end
|
||||
end
|
||||
|
||||
def rate_limit_exceeded?(error_index)
|
||||
now = Time.current
|
||||
one_hour_ago = now - 1.hour
|
||||
one_day_ago = now - 1.day
|
||||
|
||||
@error_counts[error_index][:hourly].reject! { |timestamp| timestamp < one_hour_ago }
|
||||
@error_counts[error_index][:daily].reject! { |timestamp| timestamp < one_day_ago }
|
||||
|
||||
hourly_count = @error_counts[error_index][:hourly].size
|
||||
daily_count = @error_counts[error_index][:daily].size
|
||||
|
||||
hourly_count >= MAX_ERRORS_PER_HOUR || daily_count >= MAX_ERRORS_PER_DAY
|
||||
end
|
||||
|
||||
def record_error_occurrence(error_index)
|
||||
now = Time.current
|
||||
@error_counts[error_index][:hourly] << now
|
||||
@error_counts[error_index][:daily] << now
|
||||
end
|
||||
end
|
||||
|
|
@ -205,4 +205,10 @@ Rails.application.routes.draw do
|
|||
|
||||
# SEO routes
|
||||
get "/sitemap.xml", to: "sitemap#sitemap", defaults: { format: "xml" }
|
||||
|
||||
# fuck ups
|
||||
match "/400", to: "errors#bad_request", via: :all
|
||||
match "/404", to: "errors#not_found", via: :all
|
||||
match "/422", to: "errors#unprocessable_entity", via: :all
|
||||
match "/500", to: "errors#internal_server_error", via: :all
|
||||
end
|
||||
|
|
|
|||
126
public/400.html
126
public/400.html
|
|
@ -1,126 +0,0 @@
|
|||
<!doctype html>
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<title>The server cannot process the request due to a client error (400 Bad Request)</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="initial-scale=1, width=device-width">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
<style>
|
||||
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #FFF;
|
||||
color: #261B23;
|
||||
display: grid;
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Aptos, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: clamp(1rem, 2.5vw, 2rem);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
letter-spacing: -0.0025em;
|
||||
line-height: 1.4;
|
||||
min-height: 100vh;
|
||||
place-items: center;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
font-weight: 700;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.0925em;
|
||||
}
|
||||
|
||||
b, strong {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
i, em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
main {
|
||||
display: grid;
|
||||
gap: 1em;
|
||||
padding: 2em;
|
||||
place-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
main header {
|
||||
width: min(100%, 12em);
|
||||
}
|
||||
|
||||
main header svg {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
main article {
|
||||
width: min(100%, 30em);
|
||||
}
|
||||
|
||||
main article p {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
main article br {
|
||||
|
||||
display: none;
|
||||
|
||||
@media(min-width: 48em) {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- This file lives in public/400.html -->
|
||||
|
||||
<main>
|
||||
<header>
|
||||
<svg height="172" viewBox="0 0 480 172" width="480" xmlns="http://www.w3.org/2000/svg"><path d="m124.48 3.00509-45.6889 100.02991h26.2239v-28.1168h38.119v28.1168h21.628v35.145h-21.628v30.82h-37.308v-30.82h-72.1833v-31.901l50.2851-103.27391zm115.583 168.69891c-40.822 0-64.884-35.146-64.884-85.7015 0-50.5554 24.062-85.700907 64.884-85.700907 40.823 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.061 85.7015-64.884 85.7015zm0-133.2831c-17.572 0-22.709 21.8984-22.709 47.5816 0 25.6835 5.137 47.5815 22.709 47.5815 17.303 0 22.71-21.898 22.71-47.5815 0-25.6832-5.407-47.5816-22.71-47.5816zm140.456 133.2831c-40.823 0-64.884-35.146-64.884-85.7015 0-50.5554 24.061-85.700907 64.884-85.700907 40.822 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.062 85.7015-64.884 85.7015zm0-133.2831c-17.573 0-22.71 21.8984-22.71 47.5816 0 25.6835 5.137 47.5815 22.71 47.5815 17.302 0 22.709-21.898 22.709-47.5815 0-25.6832-5.407-47.5816-22.709-47.5816z" fill="#f0eff0"/><path d="m123.606 85.4445c3.212 1.0523 5.538 4.2089 5.538 8.0301 0 6.1472-4.209 9.5254-11.298 9.5254h-15.617v-34.0033h14.565c7.089 0 11.353 3.1566 11.353 9.2484 0 3.6551-2.049 6.3134-4.541 7.1994zm-12.904-2.9905h5.095c2.603 0 3.988-.9968 3.988-3.1013 0-2.1044-1.385-3.0459-3.988-3.0459h-5.095zm0 6.6456v6.5902h5.981c2.492 0 3.877-1.3291 3.877-3.2674 0-2.049-1.385-3.3228-3.877-3.3228zm43.786 13.9004h-8.362v-1.274c-.831.831-3.323 1.717-5.981 1.717-4.929 0-9.083-2.769-9.083-8.0301 0-4.818 4.154-7.9193 9.581-7.9193 2.049 0 4.486.6646 5.483 1.3845v-1.606c0-1.606-.942-2.9905-3.046-2.9905-1.606 0-2.548.7199-2.935 1.8275h-8.197c.72-4.8181 4.985-8.6393 11.409-8.6393 7.088 0 11.131 3.7659 11.131 10.2453zm-8.362-6.9779v-1.4399c-.554-1.0522-2.049-1.7167-3.655-1.7167-1.717 0-3.434.7199-3.434 2.3813 0 1.7168 1.717 2.4367 3.434 2.4367 1.606 0 3.101-.6645 3.655-1.6614zm27.996 6.9779v-1.994c-1.163 1.329-3.599 2.548-6.147 2.548-7.199 0-11.131-5.8151-11.131-13.0145s3.932-13.0143 11.131-13.0143c2.548 0 4.984 1.2184 6.147 2.5475v-13.0697h8.695v35.997zm0-9.1931v-6.5902c-.664-1.3291-2.159-2.326-3.821-2.326-2.99 0-4.763 2.4368-4.763 5.6488s1.773 5.5934 4.763 5.5934c1.717 0 3.157-.9415 3.821-2.326zm35.471-2.049h-3.101v11.2421h-8.806v-34.0033h15.285c7.31 0 12.35 4.1535 12.35 11.5744 0 5.1503-2.603 8.6947-6.757 10.2453l7.975 12.1836h-9.858zm-3.101-15.2849v8.1962h5.538c3.156 0 4.596-1.606 4.596-4.0981s-1.44-4.0981-4.596-4.0981zm36.957 17.8323h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.643 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.515-13.0143 7.643 0 11.962 5.095 11.962 12.5159v2.1598h-16.115c.277 2.9905 1.827 4.5965 4.32 4.5965 1.772 0 3.156-.7753 3.655-2.4921zm-3.822-10.0237c-2.049 0-3.433 1.2737-3.987 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.545-3.5997zm30.98 27.5234v-10.799c-1.163 1.329-3.6 2.548-6.147 2.548-7.2 0-11.132-5.9259-11.132-13.0145 0-7.144 3.932-13.0143 11.132-13.0143 2.547 0 4.984 1.2184 6.147 2.5475v-1.9937h8.695v33.726zm0-17.9981v-6.5902c-.665-1.3291-2.105-2.326-3.821-2.326-2.991 0-4.763 2.4368-4.763 5.6488s1.772 5.5934 4.763 5.5934c1.661 0 3.156-.9415 3.821-2.326zm36.789-15.7279v24.921h-8.695v-2.16c-1.329 1.551-3.821 2.714-6.646 2.714-5.482 0-8.75-3.5999-8.75-9.1379v-16.3371h8.64v14.288c0 2.1045.996 3.5997 3.212 3.5997 1.606 0 3.101-1.0522 3.544-2.769v-15.1187zm19.084 16.2263h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.643 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.515-13.0143 7.643 0 11.963 5.095 11.963 12.5159v2.1598h-16.116c.277 2.9905 1.828 4.5965 4.32 4.5965 1.772 0 3.156-.7753 3.655-2.4921zm-3.822-10.0237c-2.049 0-3.433 1.2737-3.987 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.545-3.5997zm13.428 11.0206h8.474c.387 1.3845 1.606 2.1598 3.156 2.1598 1.44 0 2.548-.5538 2.548-1.7168 0-.9414-.72-1.2737-1.939-1.5506l-4.873-.9969c-4.154-.886-6.867-2.8797-6.867-7.2547 0-5.3165 4.762-8.4178 10.633-8.4178 6.812 0 10.522 3.1567 11.297 8.0855h-8.03c-.277-1.0522-1.052-1.9937-3.046-1.9937-1.273 0-2.326.5538-2.326 1.6614 0 .7753.554 1.163 1.717 1.3845l4.929 1.163c4.541 1.0522 6.978 3.4335 6.978 7.4763 0 5.3168-4.818 8.2518-10.91 8.2518-6.369 0-10.965-2.88-11.741-8.2518zm27.538-.8861v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.205v6.7564h-5.205v8.307c0 1.9383.941 2.769 2.658 2.769.941 0 1.993-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.871 0-9.193-2.769-9.193-9.0819z" fill="#d30001"/></svg>
|
||||
</header>
|
||||
<article>
|
||||
<p><strong>The request you sent is invalid or corrupt.</strong><br> If you're the application owner check the logs for more information.</p>
|
||||
<p>
|
||||
<strong>Hey! Congrats! You probably just found a bug!</strong><br>
|
||||
This is the Hackatime v2 beta, after all.<br><br>
|
||||
Can you take a screenshot of this page and email max@hackclub.com
|
||||
describing what you did to get here? Please make sure the current URL
|
||||
is visible in the screenshot.<br><br>
|
||||
</p>
|
||||
<p class="error-id">
|
||||
<b>Error ID:</b><span class="error-id-text"
|
||||
onclick="navigator.clipboard.writeText(this.textContent); this.textContent = 'copied!'"><!-- HONEYBADGER ERROR --></span>
|
||||
(click to copy)
|
||||
</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
120
public/404.html
120
public/404.html
|
|
@ -1,120 +0,0 @@
|
|||
<!doctype html>
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<title>The page you were looking for doesn't exist (404 Not found)</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="initial-scale=1, width=device-width">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
<style>
|
||||
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #FFF;
|
||||
color: #261B23;
|
||||
display: grid;
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Aptos, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: clamp(1rem, 2.5vw, 2rem);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
letter-spacing: -0.0025em;
|
||||
line-height: 1.4;
|
||||
min-height: 100vh;
|
||||
place-items: center;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
font-weight: 700;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.0925em;
|
||||
}
|
||||
|
||||
b, strong {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
i, em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
main {
|
||||
display: grid;
|
||||
gap: 1em;
|
||||
padding: 2em;
|
||||
place-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
main header {
|
||||
width: min(100%, 12em);
|
||||
}
|
||||
|
||||
main header svg {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
main article {
|
||||
width: min(100%, 30em);
|
||||
}
|
||||
|
||||
main article p {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
main article br {
|
||||
|
||||
display: none;
|
||||
|
||||
@media(min-width: 48em) {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- This file lives in public/404.html -->
|
||||
|
||||
<main>
|
||||
<header>
|
||||
<svg height="172" viewBox="0 0 480 172" width="480" xmlns="http://www.w3.org/2000/svg"><path d="m124.48 3.00509-45.6889 100.02991h26.2239v-28.1168h38.119v28.1168h21.628v35.145h-21.628v30.82h-37.308v-30.82h-72.1833v-31.901l50.2851-103.27391zm115.583 168.69891c-40.822 0-64.884-35.146-64.884-85.7015 0-50.5554 24.062-85.700907 64.884-85.700907 40.823 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.061 85.7015-64.884 85.7015zm0-133.2831c-17.572 0-22.709 21.8984-22.709 47.5816 0 25.6835 5.137 47.5815 22.709 47.5815 17.303 0 22.71-21.898 22.71-47.5815 0-25.6832-5.407-47.5816-22.71-47.5816zm165.328-35.41581-45.689 100.02991h26.224v-28.1168h38.119v28.1168h21.628v35.145h-21.628v30.82h-37.308v-30.82h-72.184v-31.901l50.285-103.27391z" fill="#f0eff0"/><path d="m157.758 68.9967v34.0033h-7.199l-14.233-19.8814v19.8814h-8.584v-34.0033h8.307l13.125 18.7184v-18.7184zm28.454 21.5428c0 7.6978-5.15 13.0145-12.737 13.0145-7.532 0-12.738-5.3167-12.738-13.0145s5.206-13.0143 12.738-13.0143c7.587 0 12.737 5.3165 12.737 13.0143zm-8.528 0c0-3.4336-1.496-5.8703-4.209-5.8703-2.659 0-4.154 2.4367-4.154 5.8703s1.495 5.8149 4.154 5.8149c2.713 0 4.209-2.3813 4.209-5.8149zm13.184 3.8766v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.205v6.7564h-5.205v8.307c0 1.9383.941 2.769 2.658 2.769.941 0 1.994-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.87 0-9.193-2.769-9.193-9.0819zm37.027 8.5839h-8.806v-34.0033h23.924v7.6978h-15.118v6.7564h13.9v7.5316h-13.9zm41.876-12.4605c0 7.6978-5.15 13.0145-12.737 13.0145-7.532 0-12.738-5.3167-12.738-13.0145s5.206-13.0143 12.738-13.0143c7.587 0 12.737 5.3165 12.737 13.0143zm-8.529 0c0-3.4336-1.495-5.8703-4.208-5.8703-2.659 0-4.154 2.4367-4.154 5.8703s1.495 5.8149 4.154 5.8149c2.713 0 4.208-2.3813 4.208-5.8149zm35.337-12.4605v24.921h-8.695v-2.16c-1.329 1.551-3.821 2.714-6.646 2.714-5.482 0-8.75-3.5999-8.75-9.1379v-16.3371h8.64v14.288c0 2.1045.997 3.5997 3.212 3.5997 1.606 0 3.101-1.0522 3.544-2.769v-15.1187zm4.076 24.921v-24.921h8.694v2.1598c1.385-1.5506 3.822-2.7136 6.701-2.7136 5.538 0 8.806 3.5997 8.806 9.1377v16.3371h-8.639v-14.2327c0-2.049-1.053-3.5443-3.268-3.5443-1.717 0-3.156.9969-3.6 2.7136v15.0634zm44.113 0v-1.994c-1.163 1.329-3.6 2.548-6.147 2.548-7.2 0-11.132-5.8151-11.132-13.0145s3.932-13.0143 11.132-13.0143c2.547 0 4.984 1.2184 6.147 2.5475v-13.0697h8.695v35.997zm0-9.1931v-6.5902c-.665-1.3291-2.16-2.326-3.821-2.326-2.991 0-4.763 2.4368-4.763 5.6488s1.772 5.5934 4.763 5.5934c1.717 0 3.156-.9415 3.821-2.326z" fill="#d30001"/></svg>
|
||||
</header>
|
||||
<article>
|
||||
<p><strong>The page you were looking for doesn't exist.</strong> You may have mistyped the address or the page may have moved. If you're the application owner check the logs for more information.</p>
|
||||
<p style="margin-top: 1em;">
|
||||
<strong>Hey! Congrats! You probably just found a bug!</strong><br>
|
||||
This is the Hackatime v2 beta, after all.<br><br>
|
||||
Can you take a screenshot of this page and email max@hackclub.com describing what you did to get here?<br><br>
|
||||
Also please make sure the current URL is visible in the screenshot.
|
||||
</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
<!doctype html>
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<title>Your browser is not supported (406 Not Acceptable)</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="initial-scale=1, width=device-width">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
<style>
|
||||
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #FFF;
|
||||
color: #261B23;
|
||||
display: grid;
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Aptos, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: clamp(1rem, 2.5vw, 2rem);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
letter-spacing: -0.0025em;
|
||||
line-height: 1.4;
|
||||
min-height: 100vh;
|
||||
place-items: center;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
font-weight: 700;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.0925em;
|
||||
}
|
||||
|
||||
b, strong {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
i, em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
main {
|
||||
display: grid;
|
||||
gap: 1em;
|
||||
padding: 2em;
|
||||
place-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
main header {
|
||||
width: min(100%, 12em);
|
||||
}
|
||||
|
||||
main header svg {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
main article {
|
||||
width: min(100%, 30em);
|
||||
}
|
||||
|
||||
main article p {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
main article br {
|
||||
|
||||
display: none;
|
||||
|
||||
@media(min-width: 48em) {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- This file lives in public/406-unsupported-browser.html -->
|
||||
|
||||
<main>
|
||||
<header>
|
||||
<svg height="172" viewBox="0 0 480 172" width="480" xmlns="http://www.w3.org/2000/svg"><path d="m124.48 3.00509-45.6889 100.02991h26.2239v-28.1168h38.119v28.1168h21.628v35.145h-21.628v30.82h-37.308v-30.82h-72.1833v-31.901l50.2851-103.27391zm115.583 168.69891c-40.822 0-64.884-35.146-64.884-85.7015 0-50.5554 24.062-85.700907 64.884-85.700907 40.823 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.061 85.7015-64.884 85.7015zm0-133.2831c-17.572 0-22.709 21.8984-22.709 47.5816 0 25.6835 5.137 47.5815 22.709 47.5815 17.303 0 22.71-21.898 22.71-47.5815 0-25.6832-5.407-47.5816-22.71-47.5816zm202.906 9.7326h-41.093c-2.433-7.2994-7.84-12.4361-17.302-12.4361-16.221 0-25.413 17.5728-25.954 34.8752v1.3517c5.137-7.0291 16.221-12.4361 30.82-12.4361 33.524 0 54.881 24.0612 54.881 53.7998 0 33.253-23.791 58.396-61.64 58.396-21.628 0-39.741-10.003-50.825-27.576-9.733-14.599-13.788-32.442-13.788-54.3406 0-51.9072 24.331-89.485807 66.236-89.485807 32.712 0 53.258 18.654107 58.665 47.851907zm-82.727 66.2355c0 13.247 9.463 22.439 22.71 22.439 12.977 0 22.439-9.192 22.439-22.439 0-13.517-9.462-22.7091-22.439-22.7091-13.247 0-22.71 9.1921-22.71 22.7091z" fill="#f0eff0"/><path d="m100.761 68.9967v34.0033h-7.1991l-14.2326-19.8814v19.8814h-8.5839v-34.0033h8.307l13.125 18.7184v-18.7184zm28.454 21.5428c0 7.6978-5.15 13.0145-12.737 13.0145-7.532 0-12.738-5.3167-12.738-13.0145s5.206-13.0143 12.738-13.0143c7.587 0 12.737 5.3165 12.737 13.0143zm-8.529 0c0-3.4336-1.495-5.8703-4.208-5.8703-2.659 0-4.154 2.4367-4.154 5.8703s1.495 5.8149 4.154 5.8149c2.713 0 4.208-2.3813 4.208-5.8149zm13.185 3.8766v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.205v6.7564h-5.205v8.307c0 1.9383.941 2.769 2.658 2.769.941 0 1.994-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.87 0-9.193-2.769-9.193-9.0819zm39.02-25.4194h9.083l12.958 34.0033h-9.027l-2.436-6.5902h-12.35l-2.381 6.5902h-8.806zm4.431 10.5222-3.489 9.5807h6.978zm17.44 11.0206c0-7.6978 5.095-13.0143 12.572-13.0143 6.701 0 10.854 3.9874 11.574 9.8023h-8.418c-.221-1.4953-1.384-2.6029-3.156-2.6029-2.437 0-3.988 2.2706-3.988 5.8149s1.551 5.7595 3.988 5.7595c1.772 0 2.935-1.0522 3.156-2.5475h8.418c-.72 5.7596-4.873 9.8025-11.574 9.8025-7.477 0-12.572-5.3167-12.572-13.0145zm25.676 0c0-7.6978 5.095-13.0143 12.572-13.0143 6.701 0 10.854 3.9874 11.574 9.8023h-8.418c-.221-1.4953-1.384-2.6029-3.156-2.6029-2.437 0-3.988 2.2706-3.988 5.8149s1.551 5.7595 3.988 5.7595c1.772 0 2.935-1.0522 3.156-2.5475h8.418c-.72 5.7596-4.873 9.8025-11.574 9.8025-7.477 0-12.572-5.3167-12.572-13.0145zm42.013 3.7658h8.031c-.887 5.7597-5.206 9.2487-11.686 9.2487-7.642 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.317-13.0143 12.516-13.0143 7.643 0 11.962 5.095 11.962 12.5159v2.1598h-16.115c.277 2.9905 1.827 4.5965 4.319 4.5965 1.773 0 3.157-.7753 3.655-2.4921zm-3.821-10.0237c-2.049 0-3.433 1.2737-3.987 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.545-3.5997zm23.4 16.7244v10.799h-8.694v-33.726h8.694v1.9937c1.163-1.3291 3.6-2.5475 6.148-2.5475 7.199 0 11.131 5.8703 11.131 13.0143 0 7.0886-3.932 13.0145-11.131 13.0145-2.548 0-4.985-1.219-6.148-2.548zm0-13.7893v6.5902c.665 1.3845 2.16 2.326 3.822 2.326 2.99 0 4.762-2.3814 4.762-5.5934s-1.772-5.6488-4.762-5.6488c-1.717 0-3.157.9969-3.822 2.326zm21.892 7.1994v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.206v6.7564h-5.206v8.307c0 1.9383.941 2.769 2.658 2.769.942 0 1.994-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.87 0-9.193-2.769-9.193-9.0819zm39.458 8.5839h-8.363v-1.274c-.83.831-3.322 1.717-5.981 1.717-4.928 0-9.082-2.769-9.082-8.0301 0-4.818 4.154-7.9193 9.581-7.9193 2.049 0 4.486.6646 5.482 1.3845v-1.606c0-1.606-.941-2.9905-3.045-2.9905-1.606 0-2.548.7199-2.936 1.8275h-8.196c.72-4.8181 4.984-8.6393 11.408-8.6393 7.089 0 11.132 3.7659 11.132 10.2453zm-8.363-6.9779v-1.4399c-.553-1.0522-2.049-1.7167-3.655-1.7167-1.716 0-3.433.7199-3.433 2.3813 0 1.7168 1.717 2.4367 3.433 2.4367 1.606 0 3.102-.6645 3.655-1.6614zm20.742 4.9839v1.994h-8.694v-35.997h8.694v13.0697c1.163-1.3291 3.6-2.5475 6.148-2.5475 7.199 0 11.131 5.8149 11.131 13.0143s-3.932 13.0145-11.131 13.0145c-2.548 0-4.985-1.219-6.148-2.548zm0-13.7893v6.5902c.665 1.3845 2.105 2.326 3.822 2.326 2.99 0 4.762-2.3814 4.762-5.5934s-1.772-5.6488-4.762-5.6488c-1.662 0-3.157.9969-3.822 2.326zm28.759-20.2137v35.997h-8.695v-35.997zm19.172 27.3023h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.643 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.516-13.0143 7.642 0 11.962 5.095 11.962 12.5159v2.1598h-16.116c.277 2.9905 1.828 4.5965 4.32 4.5965 1.772 0 3.157-.7753 3.655-2.4921zm-3.821-10.0237c-2.049 0-3.434 1.2737-3.988 3.5997h7.532c-.111-2.0491-1.384-3.5997-3.544-3.5997z" fill="#d30001"/></svg>
|
||||
</header>
|
||||
<article>
|
||||
<p><strong>Your browser is not supported.</strong><br> Please upgrade to a modern browser, such as the latest version of Chrome, Firefox, Safari, or Edge.</p>
|
||||
<p>
|
||||
<strong>Hey! Congrats! You probably just found a bug!</strong><br>
|
||||
This is the Hackatime v2 beta, after all.<br><br>
|
||||
Can you take a screenshot of this page and email max@hackclub.com
|
||||
describing what you did to get here? Please make sure the current URL
|
||||
is visible in the screenshot.<br><br>
|
||||
</p>
|
||||
<p class="error-id">
|
||||
<b>Error ID:</b><span class="error-id-text"
|
||||
onclick="navigator.clipboard.writeText(this.textContent); this.textContent = 'copied!'"><!-- HONEYBADGER ERROR --></span>
|
||||
(click to copy)
|
||||
</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
124
public/422.html
124
public/422.html
File diff suppressed because one or more lines are too long
125
public/500.html
125
public/500.html
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue