handling representation errors (422 responses)

@dawidpietrolaj