metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
214 stars 159 forks source link

Get message from sidn extension #149

Closed CrazyHenk44 closed 6 years ago

CrazyHenk44 commented 6 years ago

Hi,

Whenever something goes wrong with the connection we get a nice exception, but the real message is not shown. The response is like:

`

Validation of the transaction failed. Invalid password: a password must contain a minimum of 10 characters. 5b08a3e6497d8 D3074A84-6928-DA21-1790-A50F2AC086EC

`

The exception shows "Error 2200: Validation of the transaction failed.", but would it be possible to get to the "Invalid password: a password must contain a minimum of 10 characters." message?

metaregistrar commented 6 years ago

Yes, it is too bad that SIDN puts this error message in a proprietary extension. I will check to see if there is an extension that will process this.

metaregistrar commented 6 years ago

Hello Tom,

I have changed the code so that now when you use sidnEppConnection, any error will throw an sidnEppException instead of a standard eppException.

This sidnEppException has extra functions (getSidnErrorCode and getSidnErrorMessage) to retrieve the SIDN-specific error code or error message.