harbor-master icon indicating copy to clipboard operation
harbor-master copied to clipboard

Containers.start response handling

Open setiseta opened this issue 6 years ago • 2 comments

Hello,

thanks for the lib. i think i found something not working as expected. if i use the client.containers().start(container.Id); I'm getting a error with status code 204. As of the docker documentation this is the code for success. 204 no error 304 container already started/stopped

i think they should be added in harbor-master/lib/endpoints/containers.js Line: 233 Line: 253 And on line 273 only the code 204 cause ther is no code 304 on restart.

hopefully i'm not wrong. should i open a PR?

there is a PR#4 with only the code 204 but on more files. maybe this should merged first, and then add 304 to start and stop function?

Best regards

setiseta avatar Jun 08 '18 14:06 setiseta

Right now there is a PR that is up for added 204 as success. @arhea is the reviewer and the next version bump should fix this issue.

troy0820 avatar Jun 08 '18 14:06 troy0820

thx for feedback. what about 304 for container start and stop? Should it be handled as error?

setiseta avatar Jun 08 '18 14:06 setiseta