question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V1 Conformance - Create a best practice documentation for error handling

See original GitHub issue

As part of the conformance criteria, we would like Zowe Explorer to have a Best Practice Documenation on how to implement error handling.

V1 Conformance requirement is a documentation. In this document, we would like to advise extenders on how they are going to display their error message.

My proposal is

  1. to use this format: Extension Name - Error Message
  2. To throw a not implemented error for Zowe Explorer APIs that are not implemented in their extension

V2 requirement is an API: We would like to have an API that will allow users to call and pass their error message. It may still use the proposed format above. Additionally, we could implement error codes for better debugging (e.g. APIML Error Codes)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jellypunocommented, May 18, 2021

@katelynienaber Similar to what FTP ext is doing here

0reactions
katelynienabercommented, May 18, 2021

More thoughts after talking with @lauren-li

Test branch is here. Logger is here. Example of use is here.

I tagged people I think can answer the questions. But ofc anyone can add to this as they like 😃

Questions for @JillieBeanSim:

  • How would this API setup for the logger work with the cics extension? Specifically, the current WIP setup has a dependency on VSCode…

Questions for @VitGottwald & @nickImbirev:

  • We have a problem with this function. It has a dependency on VSCode AND our profiles API. To solve this, can we create the basic logging functions as a base class & profiles prompting function as an extension of this base class? similar to ZosmfCommonApi & ZosmfUssApi. Then people could skip the import of the extended class if they don’t want the profiles dependency…
  • Error codes? How to tell which error we have, without doing something like if (string.includes("I am an error")) { ... ?

Research needed:

  • Can we get name of extension from package.json with VSCode’s API? (In error messages, we must add identifying info about the extension name that caused the error)

Conclusions

  • The new logging API functions should not be in the zowe-explorer-api/src/profiles API folder, because they depend on VSCode. Maybe we can make some new file in the tree folder…
  • Localization: Extenders should pass our logger localized strings. They would run localization themselves.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Conformance Packs - AWS Config
Conformance packs are created by authoring a YAML template that contains the list of AWS Config managed or custom rules and remediation actions....
Read more >
1EdTech Question & Test Interoperability (QTI) Specification
A QTI Conformance Certification program and online validation tool are ... Usage Data best practices and will be published here as soon as...
Read more >
Version Control: A Good Practice Guide - University of Glasgow
It is a tool which tracks a series of draft documents, culminating in a final version. It provides an audit trail for the...
Read more >
Errors | Cloud APIs - Google Cloud
In general, consider the following guidelines when writing error messages: ... This message is only used by error format v1. message ErrorProto {}...
Read more >
Best practices for working with Microsoft Graph
Use Graph Explorer to get to know the API · Authentication · Consent and authorization · Handle responses effectively · Storing data locally ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found