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

create: true throw me an error #4

Open
scenaristeur opened this issue Apr 21, 2024 · 1 comment
Open

create: true throw me an error #4

scenaristeur opened this issue Apr 21, 2024 · 1 comment

Comments

@scenaristeur
Copy link

using server docker run -p 58090:8090 -v pwd/data:/opt/fluree-server/data fluree/server:df51739cf942d67f17331963a895fb097cbced5e and not the last because of fluree/server#54

and flurry-client

  async createThing(context, thing) {
    thing.created = Date.now()

    // https://github.com/fluree/fluree-client?tab=readme-ov-file#client-config
    const client = await new FlureeClient({
      host: 'localhost',
      port: 58090,
      ledger: 'cryptids',
      create: true,
    }).connect();

 console.log(client)
const transactionInstance = client.transact({
  //insert: { '@id': 'freddy', name: 'Freddy' },
  insert: thing
});

throw me an error

image

2024-04-21T11:19:55.419953110Z :post "/fluree/create" => Ledger cryptids already exists
clojure.lang.ExceptionInfo: Ledger cryptids already exists {:response {:status 409, :body {:error "Ledger cryptids already exists"}}}
	at fluree.server.handlers.create$throw_ledger_exists.invokeStatic(create.clj:69)
	at fluree.server.handlers.create$throw_ledger_exists.invoke(create.clj:66)
	at fluree.server.handlers.create$default.invokeStatic(create.clj:84)
	at fluree.server.handlers.create$default.invoke(create.clj:73)
	at clojure.lang.Var.invoke(Var.java:384)

but in the doc, it says " create, // [boolean] If true, the ledger will be created if it does not exist" https://github.com/fluree/fluree-client?tab=readme-ov-file#client-config . I though the ledger would be created if not exist, but would by pass creation if it exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@scenaristeur and others