[Enhancement]: [embed] return meaningful error message to user
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 339
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 52
Description
Enhancement
The error messages returned to user is not clear enough, for example:
>>> seekdb.open()
>>> seekdb.open()
[seekdb] seekdb has opened
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: open seekdb failed 4005 The object is initialized twice
Maybe we can transfer internal error information to mysql error message.
There're some help functions to convert oceanbase error message to user message:
// in file src/share/ob_errno.h
int ob_mysql_errno(const int oberr);
int ob_mysql_errno_with_check(const int oberr);
const char *ob_sqlstate(const int oberr);
const char *ob_strerror(const int oberr);
const char *ob_str_user_error(const int oberr);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the embedded seekdb.open() error path shown in the issue and read src/share/ob_errno.h, especially ob_mysql_errno, ob_mysql_errno_with_check, ob_sqlstate, ob_strerror, and ob_str_user_error. Trace how the internal 4005 error reaches the user-facing API. Done means failed opens return a meaningful MySQL-style or user-facing message instead of only internal error details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100