[BUG] [GO service]Inconsistent behavior when inputting invalid locale on GET /formatting/number/localizedNumber API between GO and JAVA services.

Open
#2,959 0 comments 0 reactions 2 assignees View on GitHub

@Xiaochao8 is already working on this.

Since Jan 8, 2024.

Assessment

This issue has not been assessed yet.

Description

area/go-service area/java-service kind/bug priority/low

Describe the bug
commit: 3c64756c205b147b882f64f01f171e4a90ed8ae0
Inconsistent behavior when inputting invalid locale on GET /formatting/number/localizedNumber API between GO and JAVA services.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'GET /formatting/number/localizedNumber' API.
  2. Input "abc" as locale parameter's value.
  3. See the responses:
    GO service: verify the locale validity
{
  "response": {
    "code": 400,
    "message": "invalid Locale 'abc'"
  }
}

JAVA service: return the en format

{
  "response": {
    "code": 200,
    "message": "OK",
    "serverTime": ""
  },
  "signature": "",
  "data": {
    "number": "567",
    "formattedNumber": "567",
    "scale": "0",
    "locale": "abc"
  }
}

Expected behavior
Should have consistent behavior.

Dominant language
Java
Stars
72
Forks
69
Avg merge
23h 32m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vmware/singleton

All issues in vmware/singleton

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.