best practices to throw error on backend - Theo's Typesafe Cult