question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Return multiple errors

See original GitHub issue

Would it be possible for validate/check to return all errors instead of just the first?

This would be useful for validating user input, giving the user all errors instead of just one.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nthypescommented, Jul 9, 2020

Well, if anyone still having this issue, I’m building a lib which solves this.

https://github.com/nthypes/super-ts

0reactions
ivawzhcommented, Sep 10, 2020

This git issue thread has stated the reasons for the required feature. For example, when we perform an API request body validation, we would want to tell all the invalid fields at once. I’m not proposing a breaking change. The new feature should be backward compatible with optional flag. However, myself have moved on to use io-ts and zod now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

go - Combine multiple error strings - Stack Overflow
I am new to golang, my application needs to return multiple errors in a loop, later requires to be combined and returned as...
Read more >
Canonical way to return multiple errors from close function
Is there a canonical way to return all errors? I currently use this method, which I feel is a bit dirty. func (s...
Read more >
Go: Multiple Errors Management - Medium
Here is a basic example where we need to gather generated errors: This program reads and parses a CSV text, and displays the...
Read more >
How to make VLOOKUP return multiple error values
Where the lookup value is an empty cell, instead of N/A, the formula returns "Unknown"; Where the lookup value is missing from the...
Read more >
Multiple error types - Rust By Example
In the following code, two instances of unwrap generate different error types. Vec::first returns an Option , while parse::<i32> returns a Result<i32, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found