Files
zitadel/.gitignore
T
ff4aae7b3f fix(login): improve error classification (#11926)
Closes #11923

# Which Problems Are Solved

Client-side gRPC errors (e.g. NotFound, InvalidArgument,
PermissionDenied) were being surfaced as HTTP 500 Internal Server
Errors, causing false SRE alerts and poor UI feedback.

# How the Problems Are Solved

- New transport interceptor (`error-classification.ts`): Automatically
enriches every ConnectError with httpStatus and isUserError metadata via
a `ClassifiedConnectError` wrapper
- Route handler protection (`route.ts`, `flow-initiation.ts`): Catches
classified errors from `getAuthRequest` / `getSAMLRequest` and returns
correct HTTP status codes instead of 500
- Type safety: Replaced all magic number error.code === 9 checks with
typed Code.FailedPrecondition + instanceof ConnectError across
`oidc.ts`, `saml.ts`, `password.ts`, `zitadel.ts`
- Classification-aware logging (`session.ts`): Client/user errors log at
warn level, server errors at error level
- Observability (`otel.ts`): Spans now include error.is_user_error and
http.status_code attributes for alert filtering

# Additional Changes

Gitignore `next-env.d.ts`: This file is auto-generated by Next.js on
every next dev and next build invocation. The two modes write slightly
different import paths (.next/dev/types/ vs .next/types/), which causes
git diff --exit-code to fail in CI whenever a developer runs next dev
locally before committing. Since Next.js regenerates it automatically,
there's no need to track it

---------

Co-authored-by: Ramon <mail@conblem.me>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-31 11:20:56 +02:00

113 lines
1.6 KiB
Plaintext

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, build with `go test -c`
*.test
!/**/.env.test
# Coverage
coverage.txt
profile*.cov
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
#Debug
__debug_bin*
debug
sandbox.go
/cmd/dev/
# IDE
.idea
.DS_STORE
.run
.vscode
# credential
google-credentials
key.json
.keys/*
load-test/.keys
# dumps
.backups
.local/*
.build/
#binaries
cmd/zitadel/zitadel
**/statik/statik.go
/zitadelctl
/zitadel
# buildfolders and generated files
console/dist
console/src/app/proto/generated
console/.angular
**.pb.go
!pkg/grpc/protoc/v2/options.pb.go
**.proto.mock.go
**.pb.*.go
pkg/**/**.connect.go
**.gen.go
openapi/**/*.json
# multi-version proto artifacts
/proto/latest/
/proto/v*/
/internal/api/assets/authz.go
/internal/api/assets/router.go
internal/api/ui/console/static
!internal/api/ui/console/static/gitkeep
apps/docs/content/apis/assets/assets.mdx
apps/docs/content/reference/api/
/internal/api/ui/login/static/resources/themes/zitadel/css/zitadel.css
/internal/api/ui/login/static/resources/themes/zitadel/css/zitadel.css.map
/zitadel-*-*
!apps/**/zitadel-*-*
# local
build/local/*.env
.notifications
.artifacts/*
!.artifacts/bin
.artifacts/bin/*/*/**/*
!.artifacts/zitadel
/zitadel
node_modules/
.kreya
login-client.pat
admin.pat
.env.*local
go.work
go.work.sum
# Local Netlify folder
.netlify
.vercel
# PNPM
.pnpm-store
# Nx
.nx/cache
.nx/workspace-data
.cursor/rules/nx-rules.mdc
# AI Files
CLAUDE.md
.mcp.json
.gemini/*
docs_old
apps/docs/package-lock.json
# Auto-generated by Next.js (rewrites on every dev/build)
next-env.d.ts