Open ta1meng opened 3 years ago
@congbobo184 Could you take a look at this issue? I think it's caused by incorrect combinations of thenApply
and exceptionally
as we have discussed before. I found there're a lot of similar problems in pulsar-broker's admin package before.
The issue had no activity for 30 days, mark with Stale label.
Is your enhancement request related to a problem? Please describe. Currently, pulsar-admin will sometimes output useful error messages and sometimes not. When it outputs a 500 Internal Server Error with no server-side error logged, Pulsar users often cannot figure out the reason and come to Slack for help.
There were 3 users who asked for help recently on Slack:
I encountered this problem as well, and it took me a while to figure out the problem. Exacerbating the problem is the fact that a documented example from https://pulsar.apache.org/docs/en/schema-manage/#upload-a-schema produces a 500 Internal Server Error.
The example that causes a 500 Internal Server error is:
Describe the solution you'd like
Here is an example of a helpful error from the
bin/pulsar-admin schemas upload --filename
command:Here is the unhelpful error message that multiple Pulsar users have been seeing:
Commonly asked questions:
Desired outcome:
Errorjava.io.ByteArrayInputStream@b97028c1
, log something like "the schema uploaded is invalid".Describe alternatives you've considered This is more of a bug than an enhancement request. I've described three options under
Desired outcome
in the previous section. The minimum that should be done is to replaceErrorjava.io.ByteArrayInputStream@b97028c1
withthe schema uploaded is invalid
.Additional context The schema registry is a major selling point of Pulsar vs Kafka. If schema registry is as hard to learn as it is today, it could turn away potential Pulsar users who are comparing messaging technologies.