more sensible codes
Merge branch 'better-error-codes'