AI0-001 AI Security Practice Question
A team is designing a secure API for an AI model. They want to prevent data leakage through overly detailed error messages. Which principle should they follow?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use generic error messages
Least-privilege API access and minimal error information reduce the attack surface. Specifically, returning generic error messages prevents leaking internal details.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Return detailed error codes for debugging
Why it's wrong here
Detailed error messages can leak information about the model or data.
- ✓
Use generic error messages
Why this is correct
Generic error messages avoid revealing sensitive information about the model or system.
- ✗
Log errors to the client side
Why it's wrong here
Logging to client side exposes logs to users, risking data leakage.
- ✗
Disable all error messages
Why it's wrong here
Disabling error messages completely hinders usability and debugging.
About these practice questions
This AI0-001 question is part of Courseiva's 754-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI0-001 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI0-001 exam.