adam-paterson / ibm-watson-sdk

🛠 [WIP] The unofficial Watson PHP SDK enables developers to quickly add Watson Cognitive Computing services to their PHP applications.
https://www.ibm.com/watson/
6 stars 1 forks source link

Fix exception messages #16

Open adam-paterson opened 6 years ago

adam-paterson commented 6 years ago

API errors are in the format:

{  
   "code":401,
   "error":"Not Authorized",
   "description":"2017-10-06T08:57:02-04:00, Error ERCDPLTFRM-DNLKUPERR occurred when accessing https://gateway.watsonplatform.net/tone-analyzer/api/v3/tone?version=2017-10-06&sentences=1, Tran-Id: gateway-dp01-307987946 - Invalid UserId and/or Password. Please confirm that your credentials match the end-point you are trying to access. A common error is trying to use credentials from an experimental or beta release against a GA release or vice versa"
}

We need to amend \IBM\Watson\Common\Api\AbstractApi::handleErrors() to account for that format.

adam-paterson commented 6 years ago

@StyxOfDynamite if you wanted a quick one you could look at this

StyxOfDynamite commented 6 years ago

@adam-paterson I'll take a look over the weekend if thats cool?

adam-paterson commented 6 years ago

Yeah, no rush!

Senior Programmer +44 7595 944 315 @adam_paterson

On 6 Oct 2017, at 15:25, Luke Storer notifications@github.com wrote:

@adam-paterson I'll take a look over the weekend if thats cool?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

patrikpihlstrom commented 5 years ago

I'd like to take a look at this if it's not currently being worked on.

adam-paterson commented 5 years ago

@patrikpihlstrom I’m actually in the middle of refactoring a lot of the foundation classes for the SDK.

If you’re looking to get involved in the project for hacktoberfest I’m happy to write something up for you to work on!