Errors
Provides documentation and guidance on how errors are handled in the LawVu API
The following sections on this page document and describe how errors are returned to users.
Structure
Errors produced by the API adhere to the RFC 9457 Problem Details for HTTP APIs.
Each error will always return with the following fields:
- type: A URI which can be followed to find out more about the problem.
- title: A short description of the error
- status: The HTTP status code for the problem
- detail: More information about the problem
- instance: The URI of the resource which the error relates to.
- operationId: A unique trace identifier for the request. This should be provided when requesting support.
Some error responses include additional fields to aid with troubleshooting.
Status Codes
400 Bad Request
A 400 Bad Request is returned by the API when the request cannot be processed due to invalid input from the client. This typically occurs in the following scenarios:
- Validation failures: Required fields are missing, fields contain invalid values, or the request body does not match the expected schema.
- Malformed requests: The request payload is not properly formatted (e.g., invalid JSON).
- Business rule violations: The request violates specific business logic or constraints enforced by the application.
When a 400 Bad Request is returned, the response will include details about the error in the standard RFC 9457 format. For validation errors, an additional errors
property may be present, providing field-specific error messages to help clients identify and correct the issues in their request.
401 Unauthorized
A 401 Unauthorized is returned when the request lacks valid authentication credentials. This typically occurs if the request is missing an Authorization
header, the provided token is invalid, expired, or has been revoked. To resolve this error, ensure that you include a valid access token in your request and that your authentication session is still active. For more information about authentication, refer to the authentication guide.
403 Forbidden
A 403 Forbidden is returned when the client is authenticated but does not have permission to perform the requested operation. This typically occurs if the user lacks the required roles or access rights for the resource or action. Review the user’s permissions in LawVu to determine if they have access to perform the action. For help understanding LawVu permissions, refer to our help centre.
404 Not Found
A 404 Not Found is returned when the requested resource does not exist. This may happen if the client references an identifier or path that does not correspond to any existing resource in the system.
409 Conflict
A 409 Conflict is returned when the request could not be completed due to a conflict with the current state of the resource. Common scenarios include attempting to create a resource that already exists, or updating a resource in a way that would violate uniqueness constraints.
415 Unsupported Media Type
A 415 Unsupported Media Type is returned when the request's Content-Type
header specifies a media type that is not supported by the API. For example, if the API expects application/json
but receives another format, this status code will be returned.
500 Internal Server Error
A 500 Internal Server Error is returned when the application encounters an unexpected error. If you receive this error, you can try the request again later. If the problem persists. contact LawVu support and provide the operationId
from the error response for further investigation.