panel icon indicating copy to clipboard operation
panel copied to clipboard

0.7 API ERROR: SQLSTATE

Open TylerBurr opened this issue 8 years ago • 3 comments

  • Panel: canary/dev pull today
  • Daemon: 0.5.0-rc.1
  • Server's OS: 16.04
  • Your Computer's OS & Browser: Google Chrome

Logs are included below

https://hastebin.com/takabamika.http

TylerBurr avatar Feb 08 '18 03:02 TylerBurr

What is the API call you're making that is triggering this?

DaneEveritt avatar Feb 08 '18 03:02 DaneEveritt

When i post the following data when i was missing the external_id: it would throw the 500 error

{
  "username": "ext_user",
  "email": "[email protected]",
  "last_name": "User",
  "first_name": "Test"
}

{
    "errors": [
        {
            "code": "QueryException",
            "status": "500",
            "detail": "An error was encountered while processing this request."
        }
    ]
}

I was just missing the external_id field

TylerBurr avatar Feb 08 '18 04:02 TylerBurr

I also get this error trying to create a user via the panel

[2018-02-08 23:28:52] production.ERROR: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'NULL' for key 'users_external_id_unique' (SQL: insert into `users` (`root_admin`, `language`, `use_totp`, `totp_secret`, `email`, `username`, `name_first`, `name_last`, `password`, `uuid`, `updated_at`, `created_at`) values (0, en, 0, , [email protected], ddemo, Demo, User, $2y$10$RX9iqxKgFQx6/Thq9WmITeoHYsg.CQ8.XGl2id8iPX22WgXyWVzSe, ec518044-cec6-43cb-b12d-d153e222d2a0, 2018-02-08 23:28:52, 2018-02-08 23:28:52))

TylerBurr avatar Feb 09 '18 04:02 TylerBurr