api: dont traceback when image_hash is not dict