Error handling for Go HTTP servers — structured error responses, error wrapping,
88
81%
Does it follow best practices?
Impact
99%
1.80xAverage score across 5 eval scenarios
Passed
No known issues
Custom error type
8%
100%
Structured JSON error responses
50%
100%
writeError helper
100%
100%
Recovery middleware
0%
100%
Graceful shutdown
0%
100%
Referential integrity errors
100%
100%
Uniqueness conflicts
100%
100%
Foreign key validation
100%
87%
Not-found handling
100%
100%
No internal error leaks
100%
100%
All endpoints functional
100%
100%
Custom error type
0%
100%
Unwrap method
0%
100%
Structured JSON error response
33%
100%
writeError helper
100%
100%
Recovery middleware
0%
100%
Graceful shutdown
0%
100%
No internal error leaks
30%
100%
Appropriate status codes
90%
100%
Validation with detail
75%
100%
Error wrapping with %w
0%
100%
All endpoints functional
100%
100%
Custom error type
16%
100%
Structured JSON error responses
58%
100%
writeError helper
100%
100%
Recovery middleware
0%
100%
Graceful shutdown
0%
100%
Business rule errors with proper codes
90%
100%
Uniqueness conflict as 409
100%
100%
Not-found handling
100%
100%
No internal error leaks
87%
100%
Validation with details
100%
100%
All endpoints functional
100%
100%
Custom error type
16%
100%
Structured JSON error responses
58%
100%
writeError helper
100%
100%
Recovery middleware
0%
100%
Graceful shutdown
0%
100%
Authorization error as 403
100%
100%
Validation with field details
70%
100%
Not-found returns 404
100%
100%
No internal error leaks
100%
100%
Appropriate status codes
100%
100%
All endpoints functional
100%
100%
Custom error type
0%
100%
Structured JSON error responses
50%
100%
writeError helper
100%
100%
Recovery middleware
0%
100%
Graceful shutdown
0%
100%
No internal error leaks
90%
100%
Validation status enum
100%
100%
Not-found handling
87%
100%
Appropriate status codes
80%
100%
Error wrapping with %w
0%
100%
All endpoints functional
100%
100%