Use strongly typed enums for error codes