incorporate standard error handling for all context-related errors