-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #293 from pulibrary/207-item-404
Render 404 with the correct status when item is not found
- Loading branch information
Showing
10 changed files
with
108 additions
and
53 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
40 changes: 40 additions & 0 deletions
40
lib/dpul_collections_web/controllers/error_html/404.html.heex
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,40 @@ | ||
<%!-- Note that we do not render templates through our application layout. | ||
This is to avoid circular errors. --%> | ||
<!DOCTYPE html> | ||
<html lang="en" class="[scrollbar-gutter:stable]"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>DpulCollections</title> | ||
<link rel="stylesheet" href="/assets/app.css" /> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/style.css" /> | ||
<script src="https://unpkg.com/vue@3/dist/vue.global.js"> | ||
</script> | ||
<script src="https://unpkg.com/[email protected]/dist/lux-styleguidist.iife.js"> | ||
</script> | ||
<script> | ||
document.addEventListener("DOMContentLoaded", function(){ | ||
const { createApp } = Vue | ||
createApp().use(Lux.default).mount('#app') | ||
}); | ||
</script> | ||
</head> | ||
|
||
<body class="bg-white antialiased"> | ||
<div class="flex flex-col min-h-screen" id="app"> | ||
<%= DpulCollectionsWeb.LuxComponents.header(assigns) %> | ||
<div class="flex-1"> | ||
<main class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8"> | ||
<div class="grid grid-flow-row auto-rows-max gap-20"> | ||
<div id="error" class="grid place-self-center gap-10 max-w-prose"> | ||
<p class="text-xl text-center"> | ||
<%= gettext("Page not found") %> | ||
</p> | ||
</div> | ||
</div> | ||
</main> | ||
</div> | ||
<%= DpulCollectionsWeb.LuxComponents.footer(assigns) %> | ||
</div> | ||
</body> | ||
</html> |
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 @@ | ||
defmodule DpulCollectionsWeb.ItemLive.NotFoundError do | ||
defexception message: "Item not found", plug_status: 404 | ||
end |
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
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