public function sendExceptionResponse(WebHookHandlerException $e) {
		$httpCode = '400 Bad Request';
		switch($e->getCode()) {
			case WebHookHandlerException::NO_PRIVATE_KEY:
				$httpCode = '500 Internal Server Error';
				break;
			case WebHookHandlerException::INVALID_DECRYPTED_JSON:
			case WebHookHandlerException::DECRYPTION_FAILED:
			case WebHookHandlerException::INPUT_FETCH_FAILED:
			case WebHookHandlerException::INPUT_DECODE_FAILED:
			case WebHookHandlerException::NO_ENVELOPE_KEY:
			case WebHookHandlerException::NO_PAYLOAD:
			case WebHookHandlerException::NO_INPUT_HASH:
				$httpCode = '400 Bad Request';
				break;
		}
		$this->sendHTTPResponse($httpCode, ['success' => false, 'errorCode' => $e->getCode(), 'errorDescription' => $e->getMessage()]);
		return $this;
	}
public function sendExceptionResponse(WebHookHandlerException $e) {
		$httpCode = '400 Bad Request';
		switch($e->getCode()) {
			case WebHookHandlerException::NO_PRIVATE_KEY:
				$httpCode = '500 Internal Server Error';
				break;
			case WebHookHandlerException::INVALID_DECRYPTED_JSON:
			case WebHookHandlerException::DECRYPTION_FAILED:
			case WebHookHandlerException::INPUT_FETCH_FAILED:
			case WebHookHandlerException::INPUT_DECODE_FAILED:
			case WebHookHandlerException::NO_ENVELOPE_KEY:
			case WebHookHandlerException::NO_PAYLOAD:
			case WebHookHandlerException::NO_INPUT_HASH:
				$httpCode = '400 Bad Request';
				break;
		}
		$this->sendHTTPResponse($httpCode, ['success' => false, 'errorCode' => $e->getCode(), 'errorDescription' => $e->getMessage()]);
		return $this;
	}
public function sendExceptionResponse ( WebHookHandlerException $ e ) { $ httpCode = '400 Bad Request' ; switch ( $ e -> getCode ( ) ) { case WebHookHandlerException :: NO_PRIVATE_KEY : $ httpCode = '500 Internal Server Error' ; break ; case WebHookHandlerException :: INVALID_DECRYPTED_JSON : case WebHookHandlerException :: DECRYPTION_FAILED : case WebHookHandlerException :: INPUT_FETCH_FAILED : case WebHookHandlerException :: INPUT_DECODE_FAILED : case WebHookHandlerException :: NO_ENVELOPE_KEY : case WebHookHandlerException :: NO_PAYLOAD : case WebHookHandlerException :: NO_INPUT_HASH : $ httpCode = '400 Bad Request' ; break ; } $ this -> sendHTTPResponse ( $ httpCode , [ 'success' => false , 'errorCode' => $ e -> getCode ( ) , 'errorDescription' => $ e -> getMessage ( ) ] ) ; return $ this ; }
Send a HTTP response for an exception

@param \Akkroo\APIClient\Exceptions\WebHookHandlerException $e
@return static
Send a HTTP response for an exception