Handle Ms graph predefined exception like 429

Niraj Bagde 20 Reputation points
2024-12-19T05:47:03.12+00:00

I am using ns graph sdk for java , want to handle exception like 503 and 429 but not able to get the response code in exception as not getting any specific class for the details

using following dependency

<dependency>
			<groupId>com.microsoft.graph</groupId>
			<artifactId>microsoft-graph-auth</artifactId>
			<version>0.3.0</version>
		</dependency>
		<dependency>
			<groupId>com.microsoft.graph</groupId>
			<artifactId>microsoft-graph-core</artifactId>
			<version>3.1.14</version>
		</dependency>
		<dependency>
			<groupId>com.microsoft.graph</groupId>
			<artifactId>microsoft-graph</artifactId>
			<version>6.13.0</version>
		</dependency>
		<dependency>
			<groupId>com.azure</groupId>
			<artifactId>azure-identity</artifactId>
			<version>1.3.4</version>
		</dependency>

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,657 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,221 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.