Can't publish plumber application: content_category` error: Input should be 'document', 'site' or 'plot'

I created a plumber app based on an existing template and clicked publish when the system encountered an error. Please help me to review
Error in POST():
! https://api.posit.cloud/v1/outputs failed with HTTP status 400
content_category error: Input should be 'document', 'site' or 'plot'
Backtrace:

  1. └─rsconnect::deployApp(...)
  2. └─client$createApplication(...)
  3. └─rsconnect:::POST_JSON(service, authInfo, "/outputs", json)
    
  4.   └─rsconnect:::POST(...)
    
  5.     └─rsconnect:::httpRequestWithBody(...)
    
  6.       └─rsconnect:::handleResponse(httpResponse, error_call = error_call)
    
  7.         └─rsconnect (local) reportError(unlist(json$error))
    
  8.           └─cli::cli_abort(...)
    
  9.             └─rlang::abort(...)
    

Execution halted

Hello @Gia_Nguyen ,

Sorry to hear you're having trouble publishing your app! This doesn't sound like it's doing the right thing here, but without the code it's hard to tell where this is going wrong. Would you please share a reprex that demonstrates what you are seeing? That will help us figure out where the problem is.

Thank you!
Mel

Thank you for your response,

My code is simple, I run it successfully on test but when publishing it always gives an error.
Please help me to review it.

library(plumber)

#* Return the sum of two numbers
#* @param a The first number to add
#* @param b The second number to add
#* @post /sum
function(a, b) {
    as.numeric(a) + as.numeric(b)
}

Thank you,
Gia

Hi,

Not 100% certain on this, but I think you would have to connect to a Posit Connect account to deploy Plumber apps. I don't think Posit Cloud is meant to host it:

So you could go to File -> Publish... -> Add New Account in the top right and add that

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.