Lyra
Learn
AI Learning Platform
π Midnight
π Comfort
π₯ Ember
π Paper
β Contrast
Exams
Sign in to track progress
β Back to the lesson
Module 1 Β· Quiz
Exceptions, Logging, and DI
1. What is the rule regarding exception handling in an MVC application?
Catch an exception only where you can create a new one.
Catch an exception at the lowest level possible.
Catch an exception only where you can do something about it.
Always catch all exceptions to prevent crashes.
2. What is structured logging, as described in the lesson?
Logging with simple string messages without variables.
Logging with named properties instead of baked values in strings.
Logging by writing raw SQL queries.
Logging errors directly without context.
3. Which lifetime should you use when registering a service that needs to be unique per HTTP request?
Transient
Singleton
Scoped
Transient and Scoped are the same.
4. What should you avoid logging to protect sensitive information?
Business milestones
Debug information
Connection strings and passwords
Warning messages about minor issues
Submit answers
Continue: The MVC Request Pipeline β
Review this lesson
Retake quiz