Finished Server Part 4 - Handle API errors