RespondWithError changes

Change RespondWithError to RespondWithErrorCode,
And add RespondWithError to handle the golang error type