Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit f44e05c

Browse files
author
Clément Le Provost
committed
Clarify documentation of AlgoliaException’s status code
Refs #77.
1 parent 8b15147 commit f44e05c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

algoliasearch/src/main/java/com/algolia/search/saas/AlgoliaException.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ public AlgoliaException(String message, int statusCode)
4848

4949
private static final long serialVersionUID = 1L;
5050

51+
/**
52+
* Get the error's HTTP status code (if any).
53+
* Only valid when the exception is an application-level error. Values are documented in the
54+
* <a href="https://www.algolia.com/doc/rest">REST API</a>.
55+
*
56+
* @return The HTTP status code, or 0 if not available.
57+
*/
5158
public int getStatusCode()
5259
{
5360
return statusCode;

0 commit comments

Comments
 (0)