... | @@ -214,7 +214,7 @@ See more information and a connection example [here](https://gitlab.cs.cmobility |
... | @@ -214,7 +214,7 @@ See more information and a connection example [here](https://gitlab.cs.cmobility |
|
|
|
|
|
## Errors
|
|
## Errors
|
|
|
|
|
|
As stated above, all HTTP responses other than **200 – OK** can be considered **invalid**. The format of the error response is like the following example:
|
|
As stated above, all HTTP responses other than **200 – OK** can be considered **invalid**.nevertheless, certain API methods can reply with code **202 - ACCEPTED** along with a description indicating the reason for acceptance.Regardless of whether the message code is 202 or an error code, the format of the error response is like the following example:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
... | @@ -224,9 +224,17 @@ As stated above, all HTTP responses other than **200 – OK** can be considered |
... | @@ -224,9 +224,17 @@ As stated above, all HTTP responses other than **200 – OK** can be considered |
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
*This does not apply to **Use Case 10 - Sporting Events**. Information regarding errors in that case can be found here.
|
|
#### Partially satisfactory responses
|
|
|
|
|
|
Estos errores tendrán tres categorías principales:
|
|
- HTTP Status: **202 - Accepted**
|
|
|
|
|
|
|
|
| Code | Message |
|
|
|
|
| ---- | ---------------------------------------------------------------- |
|
|
|
|
| 27 | One more Beacon is expected in order to do the dynamic tracking |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Information regarding errors in this use case can be found here. These errors will have three main categories:
|
|
|
|
|
|
#### Authentication Error
|
|
#### Authentication Error
|
|
|
|
|
... | @@ -256,6 +264,18 @@ Estos errores tendrán tres categorías principales: |
... | @@ -256,6 +264,18 @@ Estos errores tendrán tres categorías principales: |
|
| 12 | Access denied role |
|
|
| 12 | Access denied role |
|
|
| 13 | Unique key violated |
|
|
| 13 | Unique key violated |
|
|
| 14 | There is an error in one or more elements |
|
|
| 14 | There is an error in one or more elements |
|
|
|
|
| 15 | Invalid GeoJson |
|
|
|
|
| 16 | GeoJson does not belong to municipality |
|
|
|
|
| 17 | TimestampStart should be future |
|
|
|
|
| 18 | TimestampEnd should be future |
|
|
|
|
| 19 | TimestampStart should be before TimestampEnd |
|
|
|
|
| 20 | The type is not a cone |
|
|
|
|
| 21 | Cone use type has to be Infrastructure |
|
|
|
|
| 22 | Cone vehicle type has to be None |
|
|
|
|
| 23 | The beacon type must have value 4 (Unique) |
|
|
|
|
| 24 | The plan requested to track was not found |
|
|
|
|
| 25 | The event requested to track has not started yet or has already finished |
|
|
|
|
| 26 | The provided coordinates for both dynamic tracking beacons are exactly the same |
|
|
|
|
|
|
In the case of obtaining an *error 3 - Missing required property*, the response obtained will have a value in the *message* that will indicate the fields that are missing to be sent:
|
|
In the case of obtaining an *error 3 - Missing required property*, the response obtained will have a value in the *message* that will indicate the fields that are missing to be sent:
|
|
|
|
|
... | | ... | |