All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.geso.avans.JSONErrorPageRenderer Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package me.geso.avans;

import lombok.NonNull;
import me.geso.webscrew.response.WebResponse;

public interface JSONErrorPageRenderer extends ErrorPageRenderer,
		JSONRendererProvider {

	/**
	 * Render the error response.
	 *
	 * @param code
	 * @param message
	 * @return
	 */
	@Override
	public default WebResponse renderError(final int code,
			@NonNull final String message) {
		final BasicAPIResponse apiResponse = new BasicAPIResponse(code, message);
		return this.renderJSON(code, apiResponse);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy