-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enhancement] Show error messages in-app for easier triage (#365)
* Added an improved error message screen with actionable details * Added a basic 404 page * fixed tests
- Loading branch information
1 parent
a6c61cc
commit 14b8ecb
Showing
5 changed files
with
37 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<section> | ||
<h2 class="text-title-md2 font-bold text-white">404 (not found)</h2> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<section> | ||
<h2 class="text-title-md2 font-bold text-white">Internal Server Error</h2> | ||
<p class="text-body-md text-white mt-2"> | ||
This shouldn't happen! Please make a | ||
<.inline_link href="https://github.com/kieraneglin/pinchflat/issues/new/choose">GitHub issue</.inline_link> | ||
with the following information: | ||
</p> | ||
|
||
<ul class="list-disc ml-8 mb-8"> | ||
<li>What you were doing when you saw this page</li> | ||
<li> | ||
Your system details and logs from | ||
<.inline_link href={~p"/app_info"}>app info</.inline_link> | ||
</li> | ||
<li>All the information in the textarea below (use select all + copy)</li> | ||
</ul> | ||
<textarea class="w-full min-h-96 font-mono inline-block rounded-lg" readonly> | ||
**Status**: | ||
`<%= if Map.has_key?(assigns, :status), do: @status, else: "" %>` | ||
|
||
**Reason**: | ||
`<%= if Map.has_key?(assigns, :reason), do: inspect(@reason), else: "" %>` | ||
|
||
**Stacktrace**: | ||
``` | ||
<%= if Map.has_key?(assigns, :stack), do: Exception.format_stacktrace(@stack), else: "" %> | ||
``` | ||
</textarea> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters