> + @Produces(MediaType.APPLICATION_JSON)
> + @MapBinder(BindToJsonPayload.class)
> + ResourceGroup create(@PathParam("name") String name,
> @PayloadParam("location") String location, @PayloadParam("tags")Map<String,
> String> tags);
> +
> + @Named("resourcegroup:get")
> + @GET
> + @Path("resourcegroups/{name}")
> + @Fallback(NullOnNotFoundOr404.class)
> + @Nullable
> + ResourceGroup get(@PathParam("name") String name);
> +
> + @Named("resourcegroup:update")
> + @PATCH
> + @Produces(MediaType.APPLICATION_JSON)
> + @Path("resourcegroups/{name}")
> + @Fallback(NullOnNotFoundOr404.class)
We don't use 404 fallbacks on create/update operations, as they could mask the
real failure. Just remove the fallback and let the method throw an exception if
the referenced resource does not exist. Returning null in this case does not
give the right feedback to users.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57578200