NETCURL Exceptions

NETCURL Exceptions

Common integrated error messages

If no description are set, check out the pointed error code below in the constants-section.

Generic error messages

Generic error messages are normally forwarded exceptions from different places, in netcurl. Since external drivers is used (curl, soapclient, streams, wordpress, guzzle, etc), we sometimes prefer to pass external exceptions through our own calls. To identify such errors, you might want to look here.

Message

Description

HTTP Response Exception:

Occurs when a web server returns a "throwable http code". This error reflects what the web server is responding

parseResponse exception - Unexpected response code from server

Occurs when netcurl tries to return parsed content but gets http code 400 or above from server

The maximum tries of curl_exec() for <url> has been reached without any successful response [...]

Occurs during a http/https-request and the call has failed by a reason not affected by netcurl itself. In some cases, netcurl will try to repeat the http/https-request with different parameters during the first number of tries. If nothing goes success, this exception might be seen on your screen.

The maximum tries of curl_exec() for <url> , during a try to make a SSL connection to work, has been reached without any successful response [...]

Occurs during https-requests when SSL connections fail and netcurl failovers are enabled. In this case, netcurl will for example lower the security level and recall an url again. If this call fails, this exception might be seen on your screen.

exception from PHP/CURL at <functionName>: <message>

Invokes a curlexception (external), normally one defined as constant CURLE_<exceptionId>

exception from soapClient: <message>

Invokes an exception (external), inherited from the SoapClient

Internal error messages

Error messages thrown by the library itself.

Message

Code

Description

Host validation failed

NETCURL_HOSTVALIDATION_FAIL

 

curl init exception: curl library has been disabled system wide

NETCURL_CURL_DISABLED

 

curl init exception: curl library not found

NETCURL_CURL_MISSING

 

Could not set up a proper communications driver since none exist

NETCURL_NOCOMM_DRIVER

 

setDriverException: GuzzleStream does not exists

NETCURL_EXTERNAL_DRIVER_MISSING

 

Flags can not be empty

NETCURL_SETFLAG_KEY_EMPTY

 

Version requests are not allowed in current state (permissions required)

403

Occurs when getInternalRelease is invoked without permission

<ip> is not a valid ip-address

NETCURL_IPCONFIG_NOT_VALID

 

HtmlParse exception: Can not parse DOMDocuments without the DOMDocuments class

NETCURL_DOMDOCUMENT_CLASS_MISSING

 

getParsedValue exception: Requested key was not found in parsed response

NETCURL_GETPARSEDVALUE_KEY_NOT_FOUND

 

SoapClient is not available in this system

NETCURL_SOAPCLIENT_CLASS_MISSING

 

SoapClient is not available in this system

NETCURL_SOAPCLIENT_CLASS_MISSING

 

Could not find any available transport for WordPress Driver

NETCURL_WP_TRANSPORT_ERROR

 

streams for guzzle is probably missing as I can't find the request method in the current class

NETCURL_GUZZLESTREAM_MISSING

 

NetCurlDriverException: No communication drivers are currently available (not even curl).

NETCURL_NO_DRIVER_AVAILABLE

 

The format of pemLocationData is not properly set

NETCURL_PEMLOCATIONDATA_FORMAT_ERROR

 

exception from SimpleSoap->getSoap(): Could not create SoapClient. Make sure that all settings and URLs are correctly configured

NETCURL_SIMPLESOAP_GETSOAP_CREATE_FAIL

 

can not render XML data properly, since the IO library is not initialized

NETCURL_PARSE_XML_FAILURE

 

is missing MODULE_IO for rendering post data content

NETCURL_IO_PARSER_MISSING

 

getRenderedGuzzleResponse exception: Guzzle driver missing proper methods like getHeaders(), can not render response

NETCURL_GUZZLE_RESPONSE_EXCEPTION

Occurs during guzzle rendering and methods like getHeaders is missing in the response object

getWp exception: Wordpress driver seem to miss get_response_object

NETCURL_WP_REQUEST_ERROR

Occurs during wordpress rendering and methods like get_response_object is missing in the wp driver object

Netcurl Error Constants

A list of errors in netcurl and when they occur

Exception

Code

Description

Status

Exception

Code

Description

Status

NETCURL_NO_ERROR

0

No errors occured. False alarm

 

NETCURL_EXCEPTION_IT_WORKS

1

You've triggered a test exception somewhere

 

NETCURL_CURL_MISSING

1000

curl is missing in your system

REMOVED

NETCURL_SETFLAG_KEY_EMPTY

1001

When using the netcurl method setFlag($keyName, $keyValue) and $keyName has no value

 

NETCURL_COOKIEPATH_SETUP_FAIL

1002

When paths for setting cookie files can not be set due to permissions or similar

REMOVED

NETCURL_IPCONFIG_NOT_VALID

1003

When configuring outgoing ip address for calls, and the address can not be identified neither as IPv4 nor IPv6

 

NETCURL_SETSSLVERIFY_UNVERIFIED_NOT_SET

1004

In prior versions of NetCurl, some parameters for SSL verification could not be set unless another flag was enabled

REMOVED

NETCURL_DOMDOCUMENT_CLASS_MISSING

1005

Drivers for document tree in PHP is missing

 

NETCURL_GETPARSEDVALUE_KEY_NOT_FOUND

1006

Occurs when getParsedValue is used without a $keyName (recursion error)

 

NETCURL_SOAPCLIENT_CLASS_MISSING

1007

Using SOAP without the SoapClient installed

 

NETCURL_SIMPLESOAP_GETSOAP_CREATE_FAIL

1008

When SoapClient could not be initialized for an unknown reason (occurs after possible failover tries)

 

NETCURL_WP_TRANSPORT_ERROR

1009

Occurs on external driver initializiation, when no transport layer has been found (curl or streams)

 

NETCURL_CURL_DISABLED

1010

Having curl disabled when checking for external drivers (deprecated as of 6.0.20)

REMOVED

NETCURL_NOCOMM_DRIVER

1011

When no communications driver exists (deprecated as of 6.0.20)

REMOVED

NETCURL_EXTERNAL_DRIVER_MISSING

1012

Was used in driver initialization (6.0.19 or lower) when failover to guzzleStream failed

REMOVED

NETCURL_GUZZLESTREAM_MISSING

1013

Occurs during the call in guzzleDriver, when the method request in the worker was not found

 

NETCURL_HOSTVALIDATION_FAIL

1014

Occurs during extraction of url domain and the DNS resolved fails to look up an extracted hostname

 

NETCURL_PEMLOCATIONDATA_FORMAT_ERROR

1015

Occurs when SSL pem locations are misconfigured

 

NETCURL_DOMDOCUMENT_EMPTY

1016

When a domdocument is empty (seems to be unused)

 

NETCURL_NO_DRIVER_AVAILABLE_NOT_EVEN_CURL

1017

Trying to initialize NetCurl without any communications driver ("not even curl")

 

NETCURL_UNEXISTENT_FUNCTION

1018

Reserved for future use (when a __call can't find a proper method to fire up

 

NETCURL_PARSE_XML_FAILURE

1019

This usually happens when you're using older versions of NetCURL or where the IO library is not installed (composer should handle this). In NetCURL 6.0.20, XML rendering is being made from this library

 

NETCURL_IO_PARSER_MISSING

1020

As of NetCURL 6.0.20, the post data parsing (and most of the parsing between data formats) is running through MODULE_IO that is included in CryptoLIB (MODULE_CRYPTO). Without this library many things can act differently or not work at all

 

NETCURL_GUZZLE_RESPONSE_EXCEPTION

1021

Occurs during guzzle rendering and methods like getHeaders is missing in the response object

 

NETCURL_WP_REQUEST_ERROR

1022

Occurs during wordpress rendering and methods like get_response_object is missing in the wp driver object