Update api adapt withErrors method