customer_no_error_unique while there is no client

Discussion in 'Developers' Forum' started by okdev93, Jul 11, 2022.

  1. okdev93

    okdev93 New Member

    Hello

    I'm trying to create a new client with soap remote user and I'm getting this error

    `customer_no_error_unique`

    There is no client and the remote user is allowed for client functions

    See screenshot (notice: remote client and ip replaced by **** before taking the screenshot)

    Any help would be appreciate

    [​IMG]

    [​IMG]
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The error means that you are passing a customer number to the API that is not unique. This means that there is either a reseller or client with that number already or the number might be wrong in another way like setting it to 0.
     
  3. okdev93

    okdev93 New Member

    This what I understood but the issue is there is no client and only one reseller and the customer number of the reseller is not the one I used when I try to add a new client.

    Do ISPConfig keep old customer number even if their was deleted from the pannel ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Search for 'customer_no_error_unique' in the ISPConfig source code, then you can see the exact condition that triggers the error.
     
  5. okdev93

    okdev93 New Member

    Also if I try to manually add a customer with the same information from the panel and not using soap.
    Their is no problem....
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Which indicates that you pass something wrong to the API or you missed passing that value to the API.
     
  7. okdev93

    okdev93 New Member

    I printed the full param list and checked it before posting this thread
    Nothing wrong with the params
    When I try to add the client from the panel with the same information, I have no problem..
    Also yes the remote user is successfully logged
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    If this would be the case, then the client would get added. As the client does not get added, you know that you did not set all parameters correctly.

    That's to be expected, as the GUI corrects some input failures automatically while the API is a low-level API and will return you an error when you set a value wrong.

    I suggested already above what to do, see post #4.
     
  9. okdev93

    okdev93 New Member

    I found out the issue, their was a double call to add the customer...
    Fixed but now I'm getting a DB error for a incorrect integer sys_userid column for client table
    Code:
    [database_error] Incorrect integer value: '' for column `dbispconfig`.`client`.`sys_userid` at row 1
    
    I guess this userid should be generate by ispconfig right?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    This is calculated by ISPConfig, this error occurs when you set a reseller_id that does not exist. the ID must be the one of an existing reseller or it must be 0, if the client is owned by the admin.
     
    okdev93 likes this.
  11. okdev93

    okdev93 New Member

    Works like a charm
    Thanks!
     
    till likes this.

Share This Page