several fixes

- json converter
- throw exception when updating image content
- handle response correctly when not json