Documentation for possible error codes #184
-
|
Is there documentation on all the possible error codes that can be returned? Not having all possible error codes makes it difficult to map keygens errors to our own implementation of licensing errors. Help finding the documentation would be really appreciated if it exists. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Error codes are dynamic based on various model, authn, authz, and parameter validations in the system. Although we'd love to document all error codes in the future, doing so is a rather huge effort, and so it's not on the roadmap right now. The error codes in the Go SDK are the codes that we specifically need to handle, and most integrations will follow a similar path of only handling the codes that matter to them. You may have some luck searching the code base's test suite, but it won't be exhaustive. Again, most integrations will not need to handle all error codes, because most integrations only use a small subset of the API. You can simply handle the error codes that matter to your business logic and skip the rest. If one is unknown to you, it likely doesn't matter yet and so can be handled as a general "licensing error" until business logic dictates otherwise. The codes that absolutely do matter for everybody, like license validation codes are fully documented. Related: keygen-sh/keygen-api#934 |
Beta Was this translation helpful? Give feedback.
Error codes are dynamic based on various model, authn, authz, and parameter validations in the system. Although we'd love to document all error codes in the future, doing so is a rather huge effort, and so it's not on the roadmap right now. The error codes in the Go SDK are the codes that we specifically need to handle, and most integrations will follow a similar path of only handling the codes that matter to them. You may have some luck searching the code base's test suite, but it won't be exhaustive.
Again, most integrations will not need to handle all error codes, because most integrations only use a small subset of the API. You can simply handle the error codes that matter to your bus…