Bug in the example

When i run script createContract.js from page https://doc.nuxeo.com/nxdoc/manipulating-documents/ I get error when i run code return repository.create(portfolio.path, contractToCreate);

Apologies, an error occurred.
{ Error: Bad Request
    at doFetch.then (C:\Projects\docs\nuxeo\node_modules\nuxeo\lib\nuxeo.js:153:27)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
  response:
   Body {
     url: 'http://docs.pharm.local:8080/nuxeo/api/v1/repo/default/path/default-domain/workspaces/North%20America/awesome-tech',
     status: 400,
     statusText: 'Bad Request',
     headers: Headers { _headers: [Object] },
     ok: false,
     body:
      PassThrough {
        _readableState: [ReadableState],
        readable: true,
        domain: null,
        _events: [Object],
        _eventsCount: 2,
        _maxListeners: undefined,
        _writableState: [WritableState],
        writable: false,
        allowHalfOpen: true,
        _transformState: [Object] },
     bodyUsed: false,
     size: 0,
     timeout: 0,
     _abort: false } }
0 votes

0 answers

470 views

ANSWER