Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reindex Returns 500 when the Client sends a bad timestamp #2493

Closed
prb112 opened this issue Jun 10, 2021 · 2 comments
Closed

Reindex Returns 500 when the Client sends a bad timestamp #2493

prb112 opened this issue Jun 10, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@prb112
Copy link
Contributor

prb112 commented Jun 10, 2021

Describe the bug
Reindex Returns 500 when the Client sends a bad timestamp

[INFO ] Completed request[0.855 secs]: tenantId:[default] dsId:[default] user:[fhiruser] method:[POST] uri:[https://localhost:9443/fhir-server/api/v4/$reindex] status:[200]
[INFO ] Received request: tenantId:[default] dsId:[default] user:[fhiruser] method:[POST] uri:[https://localhost:9443/fhir-server/api/v4/$reindex]
[ERROR ] Unexpected error occurred while processing request for operation 'reindex': java.time.format.DateTimeParseException: Text 'BAD_STRING' could not be parsed at index 0
Unexpected error occurred while processing request for operation 'reindex': java.time.format.DateTimeParseException: Text 'BAD_STRING' could not be parsed at index 0

Environment
Which version of IBM FHIR Server?

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

@prb112 prb112 added the bug Something isn't working label Jun 10, 2021
@prb112 prb112 self-assigned this Jun 10, 2021
@prb112 prb112 added this to the Sprint 2021-08 milestone Jun 10, 2021
@prb112
Copy link
Contributor Author

prb112 commented Jun 10, 2021

Also reindex needs to return 400 when using GET

---------------------------
ID: 1
Address: https://localhost:9443/fhir-server/api/v4/$reindex
Http-Method: GET
Content-Type: 
Headers: {Accept=[application/fhir+json], X-FHIR-TENANT-ID=[default], X-FHIR-DSID=[default]}
--------------------------------------
Jun 10, 2021 9:05:32 AM org.apache.cxf.interceptor.LoggingInInterceptor
INFO: Inbound Message
----------------------------
ID: 1
Response-Code: 400
Encoding: ISO-8859-1
Content-Type: application/fhir+json
Headers: {connection=[Close], Content-Language=[en-US], Content-Length=[222], content-type=[application/fhir+json], Date=[Thu, 10 Jun 2021 13:05:32 GMT]}
Payload: {"resourceType":"OperationOutcome","id":"c0-a8-56-14-819e9faa-5677-464c-aba6-5f8e6c35a623","issue":[{"severity":"fatal","code":"not-supported","details":{"text":"HTTP method not supported: GET"},"expression":["<empty>"]}]}```

prb112 added a commit that referenced this issue Jun 10, 2021
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
lmsurpre added a commit that referenced this issue Jun 14, 2021
* End-to-end automation test for reindexing #1751

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update reindex operation tests

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Refine the Scripts

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update CI

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Implement Reindex IT Matrix for Db2

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Add Derby and Postgres to the Matrix

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update json

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update pre req

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update hostname

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update the Derby Build

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update for docker-compose vs docker compose

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update to use the right docker

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update Reindex Operation

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Confirming Test Fails

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Confirming Test Fails

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update Reindex Operation

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Disables Nats in the pre-integration-test and hardens gather-logs.sh

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update Docker Compose for Db2 to add Grant-To

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update for db2 tenant-key

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update the Build to Support a dynamic tenant-key

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Reindex Does not Document the ResourceLogicalId behavior in the Search Guide #2494

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Reindex Returns 500 when the Client sends a bad timestamp #2493

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update integration-tests so that I can log the errors

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update Reindex Operation

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Build the Right Image

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update Phase1

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update for proper bundle

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update Reindex

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Add conditional restart to db2

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update to use a startup script

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Various Updates

- Update BasicDate.json to support code vs valueString
- Improve Test Coverage for ReindexOperation

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Disable Default Tests

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update operation/fhir-operation-reindex/src/main/java/com/ibm/fhir/operation/reindex/ReindexOperation.java

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

Co-authored-by: Lee Surprenant <lmsurpre@us.ibm.com>

* Update per Code Review

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Adds support for Type,Resource and update System-Type-Instance handling
in FHIROperationRegistry

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update Docs

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update reindex workflow and phase2

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update per Code Review

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

Co-authored-by: Lee Surprenant <lmsurpre@us.ibm.com>
@tbieste
Copy link
Contributor

tbieste commented Jun 21, 2021

Verified that using GET and passing an invalid formatted tstamp each result in HTTP 400 status code.

  • Invalid format for 'tstamp' value, only 'yyyy-MM-dd' or ISO 8601 dateTime format is valid
  • HTTP method not supported: GET

@tbieste tbieste closed this as completed Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants