refactored error codes to static file for easier editing