Skip to content

schema.js/load masks schema load errors #62

@ptitzler

Description

@ptitzler

Trying to insert/update rows using the /rows endpoints, SSS returned

"statusCode":404,"body":"{\"error\":\"COL1 is not a valid parameter,COL2 is not a valid parameter,COL3 is not a valid parameter,COL4 is not a valid parameter\",\"reason\":\"Validation failure\"

Debugging the issue I noticed that an error occurred loading the schema. However, that error is not propagated and an empty default schema is returned ...

seamsdb.get("schema", function(err, data) {
    if (err) {
      return callback(null, defaultSchema);
    }
    callback(err, data);
  });

... causing validation failures because COL1, COL2 etc are unknown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions