<commit_before>//
//  ComputeError.swift
//  kappserver
//
//  Created by <NAME> on 9/13/19.
//

import Foundation

public enum ComputeError: Error {
	/// messsage didn't have the correct header
	case invalidHeader
	/// failed to connect to the compute engine server, assume can't retry connection
	case failedToConnect
	/// an error happened reading/parsing the raw data received over the network. Should be very rare, unless hack attempt.
	case failedToReadMessage
	/// failed to write data to network. Should be very rare.
	case failedToWrite
	/// asked to send data of length zero
	case sendingEmptyMessage
	/// a required field was missing from the server. Should never happen. Input was ignored
	case requiredFieldMissing
	/// the input passed to the coder was not in the propper format
	case invalidInput
	/// failed because not connected
	case notConnected
	/// Kubernetes failed to launch too many times
	case tooManyCrashes
	/// some other type of error
	case unknown
}<commit_msg>added generic error for network issues<commit_after>//
//  ComputeError.swift
//  kappserver
//
//  Created by <NAME> on 9/13/19.
//

import Foundation

public enum ComputeError: Error {
	/// messsage didn't have the correct header
	case invalidHeader
	/// failed to connect to the compute engine server, assume can't retry connection
	case failedToConnect
	/// an error happened reading/parsing the raw data received over the network. Should be very rare, unless hack attempt.
	case failedToReadMessage
	/// failed to write data to network. Should be very rare.
	case failedToWrite
	/// asked to send data of length zero
	case sendingEmptyMessage
	/// a required field was missing from the server. Should never happen. Input was ignored
	case requiredFieldMissing
	/// the input passed to the coder was not in the propper format
	case invalidInput
	/// failed because not connected
	case notConnected
	/// Kubernetes failed to launch too many times
	case tooManyCrashes
	/// Network layer error
	case network
	/// some other type of error
	case unknown
}
{'fraction_non_alphanumeric': 0.06500488758553274, 'fraction_numerical': 0.004887585532746823, 'mean_word_length': 3.4211663066954645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3726344', 'n_tokens_mistral': 548, 'n_tokens_neox': 530, 'n_words': 268}