An interface/project for describing errors/problems in tools in our organization. #300
Replies: 3 comments 2 replies
-
|
Yeah, I'm all for everything that means standardizing interfaces 👍 |
Beta Was this translation helpful? Give feedback.
-
|
This is only for Nodejs projects, right? This project does not exist, so you are basically asking for approval to actually create a new repository, right? Can you explain why you think it is better to start from scratch under |
Beta Was this translation helpful? Give feedback.
-
|
@magicmatatjahu Repo is here https://github.com/asyncapi/problem with basic configuration. You and @imabp are invited as admins. Lemme know once you are done. I will push GH Actions and setup branch protection. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As you know (or not) we didn't get to GSOC again this year, but we got a lot of submissions from potential contributors to our project proposals. One of them is An interface/project for describing errors/problems in tools in our organization.
Our organization has a lot of projects (and new ones are being added). One of the biggest problems with integrating a library to Studio/CLI/ServerAPI is that there is no structured way to deal with errors within libraries. In the ServerAPI as well as in the ParserJS we have tried to be a bit systematic and created an error system based on an interface called
Problem. You can read more about it in below articles:In general, the shape of the
Problemis as follows (JSON Schema used):As we can see, each error has its own
type(identifier), which should be an url to the source where we describe the error/problem in detail. In addition, we have three other fields (includingtitle, which is mandatory) to describe in more detail what is wrong in the given case of an error. Also, developer should be able to create additional properties - like in ParserJS thevalidationErrorsetc.Thanks to the use of given interface we will be able on the side of integration tools (ServerAPI/CLI/Studio) to see what problem we are dealing with and make appropriate logic. On the basis of the
typewe will know what additional fields the error has - in the case of normal errors this is difficult. For a CLI solution this will be an additional benefit, because we will be able to show the error in a friendly way in the console with a link to the error documentation.For now, we have no idea if the errors/problems should be described in the repository of the project or if we should create some kind of global errors registry and display them under
asyncapi.com/problem/{type}.imabp is willing to contribute. I can mentor a particular project myself. The npm package itself would be called
@asyncapi/problem. You can find more action points for this project in the issue: #266@asyncapi/tsc_members please leave a vote here in this discussion if you are ok to accept the proposal of such a project. Feel free to also ask here a followup questions if needed
Beta Was this translation helpful? Give feedback.
All reactions