Correct way to return error in custom service through GraphQL

how to run the correct error way? any luck