amplafi / amplafi-flow-client

Standard Java Client side library to interact with an Amplafi-Flow-Server
4 stars 0 forks source link

Not handling bad api_key #4

Open patmoore opened 11 years ago

patmoore commented 11 years ago

Caused by: java.net.URISyntaxException: Illegal character in path at index 35: http://apiv1.farreach.es:80/c/Can't find Callback with key/apiv1 at java.net.URI$Parser.fail(URI.java:2829) at java.net.URI$Parser.checkChars(URI.java:3002) at java.net.URI$Parser.parseHierarchical(URI.java:3086) at java.net.URI$Parser.parse(URI.java:3034) at java.net.URI.(URI.java:595) at java.net.URI.create(URI.java:857)

tuan08 commented 11 years ago

When invalid key is used, both flow and and the exception handler return a string array. In case valid, the flow return ["amp12....."] and in case there is an exception ["Can't find Callback with key"]. If we keep this return data format , I have to check if the string start with "amp.."