Skip to content

GL sync script is failing out on error instead of just logging

When there is an error, the script dies and stops processing completely. It should instead catch whatever error and skip the current project/group it is processing.

Example log:

Creating new project with name 'hawk'
Creating project with options: {"name":"hawk","visibility":"public","namespace_id":41}
{ HTTPError: Bad Request
   at fn (/app/node_modules/ky/umd.js:279:12)
   at process._tickCallback (internal/process/next_tick.js:68:7)
 name: 'HTTPError',
 response:
  Response {
    size: 0,
    timeout: 300000,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]:
     { url: 'https://gitlab.eclipse.org/api/v4/projects',
       status: 400,
       statusText: 'Bad Request',
       headers: [Headers],
       counter: 0 } },
 description:
  { path: [ 'has already been taken' ],
    name: [],
    limit_reached: [] } }
Error while creating project 'hawk'