-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Given
- SPACE is up and running
- You have an ADMIN API Key
- A you have uploaded the following file
example.yamltoPOST /services
saasName: Example
version: alfa
createdAt: "2025-08-05"
syntaxVersion: "3.0"
currency: USD
features:
featA:
valueType: BOOLEAN
defaultValue: true
expression: pricingContext['features']['featA']
type: DOMAIN
plans:
BASIC:
price: 0.0
unit: user/month
features: null
usageLimits: null
GOLD:
price: 5.0
unit: user/month
features: null
usageLimits: nullUsing curl
curl -H 'x-api-key: b72d71983d91f1b812c372e63adad4502ea17f36ed54b59a75be7b6f67c3ff9f' \
--form pricing=@example.yaml \
http://localhost:5403/api/v1/servicesWhen
Uploading the same file example.yaml again:
curl -v -H 'x-api-key: b72d71983d91f1b812c372e63adad4502ea17f36ed54b59a75be7b6f67c3ff9f' \
--form pricing=@example.yaml \
http://localhost:5403/api/v1/servicesThen
I get 500 Internal Server Error status code with the following JSON response:
{"error":"E11000 duplicate key error collection: space_db.pricings index: _serviceName_1_version_1 dup key: { _serviceName: \"Example\", version: \"alfa\" }"}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working