The error code is either a Z39.50 diagnostic code (usually a Bib-1 diagnostic) or a client side error code which is generated by PHP / YAZ itself, such as "Connect failed", "Init Rejected ", etc.
Une valeur négative indique une erreur sans diagnostic (connexion perdue,...).