kafka-ui
kafka-ui copied to clipboard
Display a clear warning message for wrong schema`s type and invalid schema`s syntax.
Is your proposal related to a problem?
(Write your answer here.) If you try to create a schema with invalid syntax or incorrect type now is displaying an unclear message (the same for already existing name, invalid syntax, incorrect schema`s type).
Describe the solution you'd like
(Describe your proposed solution here.) Display a clear warning message what the problem is, i.e. for invalid syntax 'Invalid syntax for schema', for incorrect type - 'Wrong schema type' or more precise 'There is not AVRO schema'.
Describe alternatives you've considered
(Write your answer here.)
Additional context
(Write your answer here.)
Related #1386.
@mikhailalekseevprv need to map SR errors to some of ours and return a humanized error message
Trying to reproduce this one with no success, I think it could probably be already fixed.
When I follow the steps described in the issue i just get the following:
@agolosen could you confirm please?
cc @Haarolean
Also, take into consideration that these errors come from the Schema Registry API which contains the logic to add and validate the schemas.
@armenuikafka PTAL
@Haarolean will take a look
Here are 4 cases I have checked:
- Wrong syntax - message should say that syntax is wrong
https://user-images.githubusercontent.com/104780608/185387306-76870f9a-0330-4244-91ee-104d05a2ccdc.mov
- The already existing schema with the same name and type - if create new schema, with the same type (JSON) and the same Subject, system editing the existing schema
https://user-images.githubusercontent.com/104780608/185388420-ab4860e9-776b-4020-b07a-20e4b8bfa594.mov
- The same subject but other type - if create new schema with the same subject but the other type (Protobuf), message should say that Schema in Json type with the same Subject already exists
https://user-images.githubusercontent.com/104780608/185389327-762224c5-33eb-4f5b-9370-473d09d12151.mov
- The wrong type syntax- if create new Schema, add type (JSON), but select the wrong type(Protobuf), message should say that wrong type is selected
https://user-images.githubusercontent.com/104780608/185389414-b9e54bb7-3cb8-4a63-a157-548879abbb34.mov