Add ErrorCodes constants to avoid magic numbers
Merge pull request #446 from ys/constantize-error-codes

Add ErrorCodes constants to avoid magic numbers