Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Go
/
Error wrapping
A package replaces its database but wants callers to keep matching ErrAccountMissing. Whi…
from Error wrapping
Go 1.27
intermediate
1 min
A package replaces its database but wants callers to keep matching ErrAccountMissing. Which return preserves that contract without exposing sql.ErrNoRows?
fmt.Errorf("load account: %w", ErrAccountMissing)
fmt.Errorf("load account: %w", sql.ErrNoRows)
fmt.Errorf("load account: %v", ErrAccountMissing)
errors.New(sql.ErrNoRows.Error())
Check
Ask AI about this kata
Report an error
next kata
Which three Boolean values does this program print?
Predict the output
A new version is available
Reload