forked from gojuno/go.osrm
-
Notifications
You must be signed in to change notification settings - Fork 2
/
errors.go
28 lines (25 loc) · 1.01 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package osrm
import "errors"
// Error codes that could be returned from OSRM
const (
ErrorCodeInvalidURL = "InvalidUrl"
ErrorCodeInvalidService = "InvalidService"
ErrorCodeInvalidVersion = "InvalidVersion"
ErrorCodeInvalidOptions = "InvalidOptions"
ErrorCodeInvalidQuery = "InvalidQuery"
ErrorCodeInvalidValue = "InvalidValue"
ErrorCodeNoSegment = "NoSegment"
ErrorCodeTooBig = "TooBig"
ErrorCodeNoRoute = "NoRoute"
ErrorCodeNoTable = "NoTable"
ErrorCodeNoMatch = "NoMatch"
ErrorCodeNoTrips = "NoTrips"
errorCodeOK = "Ok" // "Ok" error code never returned to library client, thus not exported
)
// Invalid request errors
var (
ErrorNotImplemented = errors.New("osrm5: the request is not implemented")
ErrEmptyProfileName = errors.New("osrm5: the request should contain a profile name")
ErrNoCoordinates = errors.New("osrm5: the request should contain coordinates")
ErrEmptyServiceName = errors.New("osrm5: the request should contain a service name")
)