use exception to handle database error for model test