# Functions
CheckError checks the err message and returns a code based on the message.
GetJSONRequestBody function to return the request body as string.
RespondNoContent Utility function to send a response without any content.
RespondWithError Utility function to convert an error message into a JSON response.
RespondWithJSON Utility function to convert the payload into a JSON response.
StringToObjectID takes a string and checks if it is a valid objectId hex if so it returns an objectID.