Skip to content

delete_records_before errors if table missing __createdtime__ #541

Open

Description

@cb1kenobi

Bug Summary

Fails to bulk delete records if table doesn't have __createdtime__

Reproduction Repository (if applicable)

No response

Steps to Reproduce

Send a POST request with operation: 'delete_records_before', date: new Date().toISOString() and you'll see the following in the Harper logs:

[job/60] [error]: ClientError: Table must have a '__createdtime__' attribute or @createdTime timestamp defined to perform this operation
    at ResourceBridge.deleteRecordsBefore (harper/dataLayer/harperBridge/ResourceBridge.ts:309:10)
    at OperationFunctionObject.deleteFilesBefore (/harper/dataLayer/delete.js:69:35)
    at job (/harper/server/jobs/jobProcess.js:57:35) {
  statusCode: 400
}

The table is created using a GraphQL schema.

Expected Behavior

Delete all records before a specific date.

Actual Behavior

Returns error and does not delete any records.

Platform

Harper 5.0.14

Console Errors

No response

Screenshots or Videos

No response

Additional Context

No response

Are you planning to fix this issue?

No, just reporting the issue

First-time contributor support

  • I'm new to contributing and would appreciate guidance on the process
  • I'd like help understanding the project structure
  • I need assistance with setting up the development environment
  • I'm comfortable contributing, but new to this project specifically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    P2

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions