Skip to content

Import Spec fails when some parts of spec are invalid #27

@bodom0015

Description

@bodom0015

Found while testing https://github.com/cheese-hub/catalog/pull/20/files

Step to Reproduce

  1. Navigate to /my-catalog and click Import Spec
    • You should see a dialog appear that allows you to import this new spec
  2. Paste the spec JSON from the above PR
  3. Click "Import" at the bottom right of the dialog

Expected Results

Spec validation error should be displayed on screen (or we workaround the format errors and fix them for the user)

Actual Results

Screen turns white and page does not finish loading

API Response:

{
  "detail": "1000 is not of type 'string' - 'resourceLimits.cpuMax'",
  "status": 400,
  "title": "Bad Request",
  "type": "about:blank"
}

Frontend error caused by API Response:

Failed to import new spec with key=svmpoisoningexample:  Error: Validation failed - spec is invalid
    at se (main.954c9ebe.chunk.js:1:10855)
    at main.954c9ebe.chunk.js:1:11297
    at p (2.03cca15f.chunk.js:2:1550)
    at Generator.<anonymous> (2.03cca15f.chunk.js:2:2897)
    at Generator.next (2.03cca15f.chunk.js:2:1913)
    at r (2.03cca15f.chunk.js:2:8517)
    at s (2.03cca15f.chunk.js:2:8720)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions