hackersatbrown / api-morning-mail

2 stars 0 forks source link

Post tranformations #18

Closed sumnerwarren closed 11 years ago

sumnerwarren commented 11 years ago

Transformation from xml to json for normal tests, ranges, and specific ids in the last week. What should we do about specific ids that are older than the last week: error or empty results?

Also added the actual fetchRes which gets live results.

I tried to match the error handling you used for the keys as much as possible. Most everything is an internal error, which most of them actually would be.

Should close #7.

jonahkagan commented 11 years ago

Looks great!

There's a few places where we get an error from somewhere and then construct and return an error object with a standard message. I think we should log the error in case we want to know what's failing. But maybe that's for later if we add in logging. Probably not a priority.

sumnerwarren commented 11 years ago

Yea, I didn't know what we were going to do about that. We probably should set up logging at some point.

sumnerwarren commented 11 years ago

I made the errors for specific ids InvalidContentErrors (400). Do you think that's appropriate or would another code be better?

jonahkagan commented 11 years ago

Yeah, that seems good. The rest of the changes look good too.