Open sushengloong opened 8 years ago
There is a specific point of time where Go server API does not return 'result' for stage object in JSON response body. See https://github.com/gocd/gocd/blob/master/server/webapp/WEB-INF/rails.new/app/models/stage_instance_api_model.rb#L26 In order to prevent KeyError, we should use .get() instead of [] to read 'result' from the stage dictionary.
'result'
stage
.get()
[]
cc: @chuajiesheng
There is a specific point of time where Go server API does not return
'result'
forstage
object in JSON response body. See https://github.com/gocd/gocd/blob/master/server/webapp/WEB-INF/rails.new/app/models/stage_instance_api_model.rb#L26 In order to prevent KeyError, we should use.get()
instead of[]
to read'result'
from thestage
dictionary.cc: @chuajiesheng