Skip to content

Commit

Permalink
fix(exception-handling): add HandleRestEx for IApi (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincejv authored Oct 29, 2022
1 parent c71536a commit fc2bc6d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.abavilla.fpi.fw.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.abavilla.fpi.fw.exceptions.handler.ApiRepoExHandler;
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;

/**
* Inherited annotation to handle rest client exceptions with {@link ApiRepoExHandler}
* @author <a href="mailto:vincevillamora@gmail.com">Vince Villamora</a>
*/
@RegisterProvider(value = ApiRepoExHandler.class)
@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface HandleRestEx {
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@

package com.abavilla.fpi.fw.rest;

import com.abavilla.fpi.fw.exceptions.handler.ApiRepoExHandler;
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import com.abavilla.fpi.fw.annotation.HandleRestEx;

@RegisterProvider(value = ApiRepoExHandler.class)
@HandleRestEx
public interface IApi {
}

0 comments on commit fc2bc6d

Please sign in to comment.