Added error mappings in documents REST resource