Skip to content

Commit 6c177f8

Browse files
DOCSP-34591 Add errorDescription and success keys to progress response (#295)
* DOCSP-34591 Add errorDescription and success keys to progress response * DOCSP-34591 updates for feedback * DOCSP-34591 updates for MM's feedback
1 parent 88c7b2d commit 6c177f8

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

source/includes/api/responses/progress.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"Source":"cluster0: localhost:27017",
1717
"Destination":"cluster1: localhost:27018"
1818
}
19-
}
19+
},
20+
"success": true
2021
}

source/includes/api/tables/progress-error-response.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@
88
- Type
99
- Description
1010

11+
* - ``success``
12+
- boolean
13+
- Status of the ``progress`` command. Value is ``true`` if the
14+
command succeeds and ``false`` if the command fails.
15+
1116
* - ``error``
1217
- string
13-
- If an error occurred, gives a detailed description of the error.
14-
This field is omitted when the call to the endpoint is successful
18+
- Type of error.
1519

20+
* - ``errorDescription``
21+
- string
22+
- Detailed description of the error.

source/includes/api/tables/progress-response.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@
114114

115115
* - ``mongosyncID``
116116
- string
117-
- The identifier string for the ``mongosync`` instance.
117+
- Identifier string for the ``mongosync`` instance.
118118

119119
* - ``coordinatorID``
120120
- string
121-
- The identifier string for the coordinator instance.
121+
- Identifier string for the coordinator instance.
122122

123123
- When ``mongosync`` is coordinated by another instance, this field shows
124124
the identifier string for the coordinator instance.
@@ -128,4 +128,3 @@
128128

129129
- When ``mongosync`` starts up, this field returns ``null`` until
130130
``mongosync`` identifies the coordinator.
131-

source/reference/api/progress.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ The ``progress`` endpoint returns either an updated status or an error.
3333
Successful Response
3434
~~~~~~~~~~~~~~~~~~~
3535

36+
The response object contains 2 top-level fields, ``success`` and
37+
``progress``.
38+
39+
The ``success`` field contains the status of the ``progress`` command.
40+
Value is ``true`` if always ``true``.
41+
3642
If ``mongosync`` successfully gets the status of the sync process,
37-
all response fields are wrapped in a top-level ``progress`` object
43+
all response fields are wrapped in the top-level ``progress`` object
3844
with the following fields:
3945

4046
.. include:: /includes/api/tables/progress-response.rst
@@ -43,7 +49,7 @@ Error Response
4349
~~~~~~~~~~~~~~
4450

4551
If ``mongosync`` encounters an error, the ``progress`` endpoint returns
46-
the following field:
52+
the following fields:
4753

4854
.. include:: /includes/api/tables/progress-error-response.rst
4955

0 commit comments

Comments
 (0)