feat: return not found. on /setup if already completed

This commit is contained in:
Elias Schneider
2026-04-19 20:13:19 +02:00
parent a0cb574313
commit 444f7ff2b0
6 changed files with 64 additions and 16 deletions

View File

@@ -28,10 +28,10 @@ func (e *AlreadyInUseError) Is(target error) bool {
return errors.As(target, &x)
}
type SetupAlreadyCompletedError struct{}
type SetupNotAvailableError struct{}
func (e *SetupAlreadyCompletedError) Error() string { return "setup already completed" }
func (e *SetupAlreadyCompletedError) HttpStatusCode() int { return http.StatusConflict }
func (e *SetupNotAvailableError) Error() string { return "not found" }
func (e *SetupNotAvailableError) HttpStatusCode() int { return http.StatusNotFound }
type TokenInvalidOrExpiredError struct{}