You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+75-27Lines changed: 75 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@ npm install linkedapi-node
16
16
17
17
## ⚡ Quick Start
18
18
19
+
> **⚠️ Note:** This package is currently in beta. Features and APIs are subject to change.
20
+
19
21
This official Linked API package simplifies interaction with LinkedIn's functionalities by wrapping the [Linked API](https://linkedapi.io), making it easier to build applications without dealing with complex API calls.
20
22
21
23
You can find various examples in the `/examples` folder to help you get started.
See `examples/restore-workflow.ts` for a full example.
@@ -807,28 +815,46 @@ See `examples/restore-workflow.ts` for a full example.
807
815
808
816
## 🚨 Error Handling
809
817
810
-
Linked API provides structured error handling for different failure scenarios.
818
+
Linked API provides structured error handling for different failure scenarios. There are two types of errors to handle:
819
+
820
+
### 1. Exceptions (try/catch)
811
821
812
822
-**`LinkedApiError`** - throws if a [common error](https://linkedapi.io/docs/making-requests/#common-errors) occurs
813
-
-**`LinkedApiWorkflowError`** - throws in case of the [workflow execution](https://linkedapi.io/docs/actions-overview/#result-options) error (like invalid URL or messaging not allowed)
814
823
-**`LinkedApiWorkflowTimeoutError`** - throws in case of timeout. Contains `workflowId` and `functionName` for future restoration
815
824
825
+
### 2. Action Errors (errors array)
826
+
827
+
-**Partial failures** - when some actions in a workflow succeed but others fail
828
+
-**Action-specific errors** - errors from individual actions within a workflow that don't cause the entire workflow to fail
-**`invalidWorkflow`** - Workflow configuration is not valid due to violated action constraints or invalid action parameters: {validation_details}.
873
+
-**`plusPlanRequired`** - Some actions in this workflow require the Plus plan.
874
+
-**`linkedinAccountSignedOut`** - Your LinkedIn account has been signed out in our cloud browser. This occasionally happens as LinkedIn may sign out accounts after an extended period. You'll need to visit our platform and reconnect your account.
875
+
-**`languageNotSupported`** - Your LinkedIn account uses a language other than English, which is currently the only supported option.
876
+
-**`timeout`** - Local execution timeout. Contains `workflowId` and `functionName` for future restoration.
877
+
878
+
### Common Action Error Types
879
+
880
+
-**`personNotFound`** - Provided URL is not an existing LinkedIn person. (sendMessage, syncConversation, checkConnectionStatus, sendConnectionRequest, withdrawConnectionRequest, removeConnection, fetchPerson, salesNavigatorSendMessage, salesNavigatorSyncConversation, salesNavigatorFetchPerson)
881
+
-**`messagingNotAllowed`** - Sending a message to the person is not allowed. (sendMessage, salesNavigatorSendMessage)
882
+
-**`alreadyPending`** - Connection request to this person has already been sent and is still pending.(sendConnectionRequest)
883
+
-**`alreadyConnected`** - Your LinkedIn account is already connected with this person. (sendConnectionRequest)
884
+
-**`emailRequired`** - Person requires an email address to send a connection request. (sendConnectionRequest)
885
+
-**`requestNotAllowed`** - LinkedIn has restricted sending a connection request to this person. (sendConnectionRequest)
886
+
-**`notPending`** - There is no pending connection request to this person. (withdrawConnectionRequest)
887
+
-**`connectionNotFound`** - Person is not in your connections. (removeConnection)
888
+
-**`searchingNotAllowed`** - LinkedIn has blocked performing the search due to exceeding limits or other restrictions. (searchCompanies, searchPeople, salesNavigatorSearchCompanies, salesNavigatorSearchPeople)
889
+
-**`companyNotFound`** - Provided URL is not an existing LinkedIn company. (fetchCompany, salesNavigatorFetchCompany)
890
+
-**`retrievingNotAllowed`** - LinkedIn has blocked performing the retrieval due to exceeding limits or other restrictions. (retrieveConnections, fetchCompany, salesNavigatorFetchCompany)
891
+
-**`postNotFound`** - Provided URL is not an existing LinkedIn post. (fetchPost, reactToPost, commentOnPost)
892
+
-**`commentingNotAllowed`** - Commenting is not allowed on this post. This could be due to the post author's privacy settings, LinkedIn restrictions on commenting, or because the post type does not support comments. (commentOnPost)
893
+
-**`noSalesNavigator`** - Your account does not have Sales Navigator subscription. (salesNavigatorSendMessage, salesNavigatorSyncConversation, salesNavigatorSearchCompanies, salesNavigatorSearchPeople, salesNavigatorFetchCompany, salesNavigatorFetchPerson)
0 commit comments