Added error method to API and prevented empty inbox from 404ing