If I remember correctly, when you import a bucket from the web-ui it is actually supposed to show just “null” when it succeeds (I know it’s horrible UX, but very few have used the feature yet as far as I know).
Are you sure that the import was not successful? The second error pretty much just says (in a hard to read way) that a bucket with that name already exists (the bucketmodel.id has the UNIQUE constraint which it was not able to apply, so some bucket already has that id).