An error code is a value returned to provide context on why an error occurred. Error codes are often provided in lieu of an error message for the sake of brevity or consistency.