kir-dev / kir-dev/warp-drive

Create error pages for common errors

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Go
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Currently if an error happens only a string is returned to the browser. Create pages for common errors:
- 401 unauthorized
- 404 not found
- 500 internal error

Every time an error occurs render the appropriate error page, or no page is defined, then render the error string. Always set the correct status code.

For images, create a 'not found' image and serve that if the image is not found. The dimensions of the 'not found' image must match the requested image's dimensions. For example trying to access the image at `/97bdbe337edb25031be6ba9fd499ec19cf3ccaad` path, and there is no image with that hash, then a standard-sized error-image has to be sent back. When the width is specified (`/97bdbe337edb25031be6ba9fd499ec19cf3ccaad/500`) the error-image must match that width.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the request handlers for the 401, 404, and 500 responses and for image paths with optional width values. Define the required error-page fallback and status-code behavior, then verify that missing images return a not-found image with the requested dimensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.