raise error with appropriate exception class so we pipeline it correctly