Update api request handlers to not be exported
Move error responses into helper functions