Unexpected yaml structure in UD devfile editor can cause internal server error
See original GitHub issueDescribe the bug
When editing a workspace’s devfile in the UD, certain errors in the yaml cause internal server error notifications and a stacktrace to be logged to console, e.g.:
2019-07-25 21:52:43,678[nio-8080-exec-1] [ERROR] [c.a.c.r.RuntimeExceptionMapper 47] - Internal Server Error occurred, error time: 2019-07-25 21:52:43
| com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2136 path $.devfile.attributes[0]
| at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
| at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
| at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
| at com.google.gson.Gson.fromJson(Gson.java:927)
This occurs when entering an object in place of an array or vice-versa
Che version
- latest
- nightly
- other: please specify
Steps to reproduce
Open workspace configuration to the devfile editor tab. Append the yaml
attributes:
- persistVolumes: 'false'
(an array instead of an object), and the error appears.
Expected behavior
This type of error should at least not print a stacktrace.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to Fix Errors in YAML (.YML) Config Files - Knowledgebase
We have a video tutorial on fixing YAML (.yml) configuration errors: ... your server settings, plugins or mods you will typically be editing...
Read more >Chapter 4. Configuring CodeReady Workspaces
The activity table can contain invalid or stale data if some unforeseen errors happen, as a server failure at a peculiar point in...
Read more >Internal Server Error when deploying simple Flask app onto ...
Your code is producing a list and trying to return a list as you're doing in flask will lead to the error -....
Read more >dvc.yaml Files | Data Version Control
The list of stages is typically the most important part of a dvc.yaml file, though the file can also be used to configure...
Read more >Basic Structure - Swagger
You can write OpenAPI definitions in YAML or JSON. ... Internal staging server for testing ... default: description: Unexpected error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it can be handled on Dashboard side within https://github.com/eclipse/che/issues/15654
I think it duplicates the following issue https://github.com/eclipse/che/issues/3334