handled the 500 server error
organized the error msgs in the services.rb file