Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error clarity: Document insertion failed unexpectedly (due to abstract subdocument type) #2113

Open
hoijnet opened this issue Mar 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hoijnet
Copy link

hoijnet commented Mar 17, 2024

Describe the bug
When a subdocument has the abstract flag on it, it (correctly) prevents an instance of it to be created.

The error message is very hard to track down and I was worried about an internal issue in TerminusDB.

The schema checker should be improved to report the errors of abstract subdocuments properly and give a better error message.

To Reproduce
Steps to reproduce the behavior:

  1. Create an abstract subdocument type
  2. Add it to a type
  3. Create a document of the type
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

{
  "name": "Server request error",
  "message": "Document insertion failed unexpectedly",
  "data": {
    "@type": "api:InsertDocumentErrorResponse",
    "api:error": {
      "@type": "api:DocumentInsertionFailedUnexpectedly",
      "api:document": {

Info (please complete the following information):

  • OS: DFRNT

Additional context
N/A

@hoijnet hoijnet added the bug Something isn't working label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant