Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-8010

message portion of http response contains stacktrace instead of user friendly message

    XMLWordPrintable

    Details

      Description

      When attempting to set the activeDate field via REST and receiving a 400 error, the message portion of the http response contains a stacktrace and not a user friendly message.

      http request:

      curl --insecure -L -X PATCH  --data '[{"operation": "replace", "field": "/activeDate", "value": "20120927"}]' https://mark-gke.iam.perf-pit-team.forgeops.com/openidm/managed/user/e076134c-c961-40b7-b82c-2b3da1d9ffa6
      

      response:

      {"code": 400,
      "reason": "Bad Request",
      "message": "The request cannot be processed because an error occurred while encoding the values for the field '/activeDate': 'DateTimeParseException: Text '20120927' could not be parsed at index 0 at Utils.java:135 Utils.java:126 Utils.java:117 SimplePropertyMapper.java:206 AbstractLdapPropertyMapper.java:398 AbstractLdapPropertyMapper.java:298 ObjectPropertyMapper.java:388 FlowableConcatMapEager.java:118 FlowableFromIterable.java:243 FlowableFromIterable.java:131 FlowableConcatMapEager.java:108 FlowableFromIterable.java:69 FlowableFromIterable.java:47 Flowable.java:15863 FlowableConcatMapEager.java:54 Flowable.java:15863 Flowable.java:15809 FlowableConcatMapEager.java:134 FlowableFromIterable.java:243 FlowableFromIterable.java:131 FlowableConcatMapEager.java:108 FlowableFromIterable.java:69 FlowableFromIterable.java:47 Flowable.java:15863 FlowableConcatMapEager.java:54 Flowable.java:15863 Flowable.java:15809 FlowableReduceSeedSingle.java:50 Single.java:4813 SingleFlatMap.java:37 Single.java:4813 SingleFlatMap.java:85 MaybeSwitchIfEmptySingle.java:82 FlowableReduceMaybe.java:137 BasicFuseableSubscriber.java:120 BasicFuseableSubscriber.java:120 ReplayProcessor.java:761 ReplayProcessor.java:639 BasicFuseableSubscriber.java:153 BasicFuseableSubscriber.java:153 FlowableReduceMaybe.java:95 BasicFuseableSubscriber.java:67 BasicFuseableSubscriber.java:67 ReplayProcessor.java:350 Flowable.java:15863 FlowableFilter.java:37 Flowable.java:15863 FlowableMap.java:38 Flowable.java:15863 FlowableReduceMaybe.java:58 Maybe.java:5330 MaybeSwitchIfEmptySingle.java:45 Single.java:4813 SingleFlatMap.java:37 Single.java:4813 SingleObserveOn.java:35 Single.java:4813 Single.java:4799 Utils.java:234 RxRequestHandlerAdapter.java:262 Single.java:5328 RxRequestHandlerAdapter.java:237 Router.java:345 RxRequestHandlerAdapter.java:146 Utils.java:260 SingleCreate.java:40 Single.java:4813 SingleFlatMap.java:85 SingleJust.java:30 Single.java:4813 SingleFlatMap.java:37 Single.java:4813 SingleObserveOn.java:35 Single.java:4813 Single.java:4799 Utils.java:234 RxRequestHandlerAdapter.java:262 Single.java:5328 RxRequestHandlerAdapter.java:237 Router.java:345 DescribableRequestHandler.java:84 FilterChain.java:114 SchemaLoaderFilter.java:198 SchemaLoaderFilter.java:100 SchemaLoaderFilter.java:198 FilterChain.java:112 FilterChain.java:261 ExplicitDJTypeHandler.java:243 GraphTypeHandler.java:646 GraphTypeHandler.java:646 PromiseImpl.java:434 PromiseImpl.java:422 PromiseImpl.java:538 PromiseImpl.java:579 PromiseImpl.java:267 PromiseImpl.java:217 PromiseImpl.java:346 PromiseImpl.java:538 PromiseImpl.java:579 PromiseImpl.java:267 PromiseImpl.java:217 PromiseImpl.java:346 PromiseImpl.java:538 PromiseImpl.java:579 PromiseImpl.java:267 PromiseImpl.java:217 ConsumerSingleObserver.java:62 SingleObserveOn.java:81 ScheduledDirectTask.java:41 ScheduledDirectTask.java:28'"}
      

      Expected:
      message indicating incorrect operation or incorrect date format

        Attachments

          Issue Links

            Activity

              People

              ondrej.fuchsik Ondrej Fuchsik
              markg Mark Gibson
              Matthew Swift Matthew Swift
              Ondrej Fuchsik Ondrej Fuchsik
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: