I’m a newbie

Status Exception and Messaging (javascript?)

I built an app using the FullContact API (XML). Max, you actually helped me wih this at HackDenver :-)


The problem I'm having is when I'm searching for a name that doesn't exist.

Right now, the mapping is set up so that if the name exists, it's tells me how many people have that name. If, however, there is an "exception" where the "status" is 404 (meaning the name does not exist), then it displays the "message" associated with that "status".

This is all on FullContact's side.

Result of API pull...

/ exception>
/ status>404
/ message>User with name abcdef not found.
/ exception>

In the code above, "abcdef" is the name that was searched. The name obviously does not exist, so therefor the "message" is produced on screen on the mobile app.

If it helps, here's how the results look in JSON (which I'm not using)...
"status": 404,
"message": "User with name Ssssssss not found."

My questions is... How do I get the app to display a different message AND still display the name.

Example: That name "abcdef" does not exist.

I don't know any javascript :-(
1 person has
this question
This topic is no longer open for comments or replies.