You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/04/04 17:15:43 UTC

[GitHub] [trafficcontrol] rawlinp commented on issue #3447: TO Client: Alerts are not returned even when they exist?

rawlinp commented on issue #3447: TO Client: Alerts are not returned even when they exist?
URL: https://github.com/apache/trafficcontrol/issues/3447#issuecomment-479986043
 
 
   Yeah I think I would agree this is just tech debt. The TO Go client went with a simple interface that doesn't return much _typed_ information about the request (e.g. status code) and mostly just answers the question "did my request work (i.e. was the status code 200)?". A lot of the client methods don't even fully unmarshal the response body for 200s (e.g. `CreateDivision()` returning just `tc.Alerts` instead of something like `tc.DivisionDetailResponse` which would contain alerts _and_ the response).
   
   IMO all the client methods should take nullable structs as input and return nullable structs in the output, and the response should be fully unmarshalled into structs that contain the full response body (i.e. not just `tc.Alerts`). The client methods should also return the response code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services