I have received 341 error notification emails for the below error
We\'re sorry, a server error occurred. Please wait a bit and try again.
Done, no more "we're are sorry server error" for DriveApp functions in the script.
Problem Solved.
The problem is with string replace function in some other function. I am using the string replace function with regular expression as input to replace function. The regular expression was incorrect due which i am getting the above error.
That's really weird, at least GAS should give some proper error.