Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle HTTP 423 Locked #1001

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.cloudesire.platform.apiclient.exceptions.BadRequestException;
import com.cloudesire.platform.apiclient.exceptions.ConflictException;
import com.cloudesire.platform.apiclient.exceptions.InternalServerErrorException;
import com.cloudesire.platform.apiclient.exceptions.LockedException;
import com.cloudesire.platform.apiclient.exceptions.MethodNotAllowedException;
import com.cloudesire.platform.apiclient.exceptions.NetworkException;
import com.cloudesire.platform.apiclient.exceptions.ResourceNotFoundException;
Expand Down Expand Up @@ -83,6 +84,7 @@ private <T> RuntimeException exceptionHandling( retrofit2.Response<T> response )
case 405: return new MethodNotAllowedException( errorMessage, error );
case 409: return new ConflictException( errorMessage, error );
case 422: return new UnprocessableEntityException( errorMessage, error );
case 423: return new LockedException( errorMessage, error );
case 500: return new InternalServerErrorException( errorMessage, error );
default: return new BackendException( errorMessage, error );
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.cloudesire.platform.apiclient.exceptions;

import com.cloudesire.platform.apiclient.response.error.ErrorResponse;

public class LockedException extends BackendException
{
public LockedException( String message, ErrorResponse error )
{
super( message, error );
}
}