Return multiple errors
See original GitHub issueWould 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:
- Created 7 years ago
- Reactions:9
- Comments:15 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Well, if anyone still having this issue, I’m building a lib which solves this.
https://github.com/nthypes/super-ts
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.