parser-js icon indicating copy to clipboard operation
parser-js copied to clipboard

Export error type strings for other tools to use in error handling (e.g. invalid-json)

Open BOLT04 opened this issue 4 years ago • 4 comments

Reason/Context

  • This improvement is necessary so that the parser-js becomes the sole owner of these error types, and these strings aren't spread across multiple repos. When tools need these strings they can just import the constants exported by the parser.
  • By having these errors exposed as an array or TypeScript type, other tools can leverage them in their validation and error handling
  • This feature would be used in server-api at least. The request was motivated by this comment: https://github.com/asyncapi/server-api/pull/22#discussion_r780324931

Description

  • What changes have to be introduced? R: a new JS module exporting these error type strings
  • Will this be a breaking change? R: I don't think so, it should be a new feature added as a minor release. Other tools can import these constants or not.
  • How could it be implemented/designed? R: Inside the folder lib/errors we could have a JS module that exports different objects. One for "client side" errors (input parameters), and another for the rest. Then add the strings that are documented in here to the appropriate object.

BOLT04 avatar Jan 15 '22 13:01 BOLT04

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar Jan 15 '22 13:01 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar May 16 '22 00:05 github-actions[bot]

It should be resolved in the 2.0.0 of parserJS.

magicmatatjahu avatar May 16 '22 06:05 magicmatatjahu

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Sep 14 '22 00:09 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jan 14 '23 00:01 github-actions[bot]

still relevant 🙂

BOLT04 avatar Mar 17 '23 22:03 BOLT04

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jul 16 '23 00:07 github-actions[bot]