-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: control openapi schema not found
Add custom error OpenApiSchemaNotFoundError No try/catch on index.js added to avoid future conflicts with #16. It will be done there. Closes #22
- Loading branch information
1 parent
51d9b1d
commit bb8d4d7
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const OPENAPI_SCHEMA_NOT_FOUND_ERROR_MSG = 'No OpenAPI schema found in the given directory'; | ||
|
||
export class OpenApiSchemaNotFoundError extends Error { | ||
constructor() { | ||
super(OPENAPI_SCHEMA_NOT_FOUND_ERROR_MSG); | ||
this.name = 'OpenApiSchemaNotFoundError'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters