@atscript/moost-odata 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -411,11 +411,11 @@ The adapter reports a failure of the service as one of atscript-db's store-failu
|
|
|
411
411
|
atscript-db 0.1.197), which moost-db answers itself, on any controller over the space, in its
|
|
412
412
|
envelope (`{ message, statusCode, code, errors }`, the code also on the one entry):
|
|
413
413
|
|
|
414
|
-
| The service
|
|
415
|
-
|
|
|
416
|
-
| `5xx` but `501`, no answer, `401` / `403` (the server's credentials), an HTML login page, a write without a session, another status | `502` | `STORE_FAILED` |
|
|
417
|
-
| timed out, or the call was aborted (`callTimeout`); `504`
|
|
418
|
-
| `429`
|
|
414
|
+
| The service | Answer | `code` |
|
|
415
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------- |
|
|
416
|
+
| `5xx` but `501`, no answer, `401` / `403` (the server's credentials), an HTML login page, a redirected write, a write without a session, another status | `502` | `STORE_FAILED` |
|
|
417
|
+
| timed out, or the call was aborted (`callTimeout`); `504` | `504` | `STORE_TIMEOUT` |
|
|
418
|
+
| `429` | `429` | `STORE_THROTTLED` |
|
|
419
419
|
|
|
420
420
|
- Refused credentials are always the server's fault: the server calls the service with
|
|
421
421
|
credentials it was given, and the caller can do nothing about them.
|
|
@@ -465,7 +465,9 @@ The write endpoints are moost-db's, over the writes of [`@atscript/db-odata`](ht
|
|
|
465
465
|
overwrites whatever changed since the caller read the entity, without a conflict. Where the
|
|
466
466
|
service requires `If-Match`, the adapter reads the current ETag right before the write: that
|
|
467
467
|
satisfies the service's If-Match requirement, nothing more. A change in the moment between that
|
|
468
|
-
read and the write has both repeated, three attempts in all, then `503` `SERIALIZATION_FAILURE`.
|
|
468
|
+
read and the write has both repeated, three attempts in all, then `503` `SERIALIZATION_FAILURE`.
|
|
469
|
+
A set that declares no version token gets no read and no repeat: a `412` or `428` to its write
|
|
470
|
+
is `502` `STORE_FAILED`, entry code `PRECONDITION_REQUIRED`. An atscript-ui edit form (0.1.190
|
|
469
471
|
and later) sends the token of the row it loaded, so its save detects conflicts.
|
|
470
472
|
- **Sessions.** A write needs the session the space keeps for its credentials
|
|
471
473
|
([Sessions](#sessions)).
|
|
@@ -522,7 +524,7 @@ takes moost-db's `queryTarget` (atscript-ui's "all matching rows", at most 50).
|
|
|
522
524
|
writes, it sends the version token the row load read right before it as `If-Match`; a `412` (the
|
|
523
525
|
row changed in between) answers `409` `VERSION_MISMATCH` with the current token. A function, and
|
|
524
526
|
any call on the collection, sends `If-Match: *` on a set with a version token (SAP CAP refuses a
|
|
525
|
-
bound call without one)
|
|
527
|
+
bound call without one); a `412` to it means the row is gone, `404` `NOT_FOUND`. An operation
|
|
526
528
|
the live service no longer has answers `404`, one it changed so that the build no longer fits
|
|
527
529
|
`500`, after your guards and before any call, and both are left out of `/meta`. If you override
|
|
528
530
|
`prepareRequest`, call `await super.prepareRequest(ctx)` first. See
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/moost-odata",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Moost integration for serving OData services as Atscript DB controllers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@atscript/db-odata": "^0.0.
|
|
40
|
-
"@atscript/odata": "^0.0.
|
|
39
|
+
"@atscript/db-odata": "^0.0.2",
|
|
40
|
+
"@atscript/odata": "^0.0.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@atscript/core": "^0.2.25",
|