This has since changed and in v20.11, errors returned from custom REST endpoints in a specific format (with errors key being an array of objects) would be returned back to the user. You can look at Feat(GraphQL): This PR allows to return errors from custom REST endpoint. by JatinDev543 · Pull Request #6604 · dgraph-io/dgraph · GitHub for more details. We’ll also get the docs up for it soon.
1 Like