PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Software Engineering Fundamentals/Stripe

Debug Validation Error Aggregation

Last updated: May 14, 2026

Quick Overview

This question evaluates debugging, error-handling, and data-validation skills focused on aggregating nested validation errors, filtering null/empty messages, and ensuring consistent sequence serialization within a schema-based validation library, situated in the Software Engineering Fundamentals domain (data validation and serialization).

  • hard
  • Stripe
  • Software Engineering Fundamentals
  • Software Engineer

Debug Validation Error Aggregation

Company: Stripe

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Onsite

You are given a Python validation library similar to Colander. A schema node can run multiple validators. Validators may raise validation errors, and all errors are aggregated into a structured dictionary through an `asdict()` method. The current implementation has three failing test groups. Your task is to debug the code, identify the root causes, and implement fixes. ### Requirements 1. **Handle null or empty validation messages** - Some validators produce `None`, an empty string, or lists containing null/empty messages. - Aggregation currently crashes when combining these messages. - Fix the aggregation logic so it filters invalid messages before combining them. - Real messages should still be preserved. 2. **Handle nested validation errors correctly** - Validators can be nested across multiple schema levels. - Errors from inner validations must be propagated and combined correctly in `asdict()`. - Nested structures may contain values such as `[None, 'must be positive']`. - The final output should not crash, should not include null messages, and should not lose valid child errors. 3. **Make sequence serialization defaults consistent** - During serialization, empty inputs and null-like values are currently handled differently. - For sequence fields, inputs such as `[]` and lists containing only null-like values should be treated consistently. - Defaults should be applied uniformly regardless of whether the sequence is empty or contains only null-like placeholders. Explain how you would debug the failures and what code-level changes you would make.

Quick Answer: This question evaluates debugging, error-handling, and data-validation skills focused on aggregating nested validation errors, filtering null/empty messages, and ensuring consistent sequence serialization within a schema-based validation library, situated in the Software Engineering Fundamentals domain (data validation and serialization).

Related Interview Questions

  • Generate a ride map image via POST API - Stripe (medium)
Stripe logo
Stripe
May 14, 2026, 12:00 AM
Software Engineer
Onsite
Software Engineering Fundamentals
0
0

You are given a Python validation library similar to Colander. A schema node can run multiple validators. Validators may raise validation errors, and all errors are aggregated into a structured dictionary through an asdict() method.

The current implementation has three failing test groups. Your task is to debug the code, identify the root causes, and implement fixes.

Requirements

  1. Handle null or empty validation messages
    • Some validators produce None , an empty string, or lists containing null/empty messages.
    • Aggregation currently crashes when combining these messages.
    • Fix the aggregation logic so it filters invalid messages before combining them.
    • Real messages should still be preserved.
  2. Handle nested validation errors correctly
    • Validators can be nested across multiple schema levels.
    • Errors from inner validations must be propagated and combined correctly in asdict() .
    • Nested structures may contain values such as [None, 'must be positive'] .
    • The final output should not crash, should not include null messages, and should not lose valid child errors.
  3. Make sequence serialization defaults consistent
    • During serialization, empty inputs and null-like values are currently handled differently.
    • For sequence fields, inputs such as [] and lists containing only null-like values should be treated consistently.
    • Defaults should be applied uniformly regardless of whether the sequence is empty or contains only null-like placeholders.

Explain how you would debug the failures and what code-level changes you would make.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Stripe•More Software Engineer•Stripe Software Engineer•Stripe Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.