console_session_required
HTTP status: 401 · Code: console_session_required
A /v1/console call without a valid console session, or with an API key or app session.
Why it happens
Section titled “Why it happens”A /v1/console call came without a valid console session cookie, or with an API key or an app user’s token instead. Console operations are only for the Orvano console itself.
How to fix
Section titled “How to fix”Sign in to the console again. If your own code made the call, use the public API instead: app users go through the client SDKs, and server work goes through an API key. Console operations are not part of the public SDKs.
Catch it in your code
Section titled “Catch it in your code”Every SDK throws one error type for a failed call. Match on its code, which is always console_session_required for this error, never on the message.
import { ErrorCode, OrvanoError } from '@orvano/js'
try { // your Orvano call} catch (error) { if (error instanceof OrvanoError && error.code === ErrorCode.consoleSessionRequired) { // handle console_session_required } else { throw error }}import 'package:orvano_flutter/orvano_flutter.dart'; // or orvano_dart on a server
try { // your Orvano call} on OrvanoException catch (error) { if (error.code != ErrorCode.consoleSessionRequired) rethrow; // handle console_session_required}using Orvano;
try{ // your Orvano call}catch (OrvanoException error) when (error.Code == ErrorCode.ConsoleSessionRequired){ // handle console_session_required}The error also carries the HTTP status (401), a message, and a request ID. Quote the request ID when you report a problem: the server logs it with the failure. See Errors for how errors work in every SDK, or every error code.